0

I've this function:(myvariable is un unsigned int) config_setting_lookup_int64 is the libconfig.h function -> int config_lookup_int64 (const config t * config, [Function] const char * path, long long * value)

config_setting_lookup_int64(file, "myvariable", &myvariable);

I can see this warning: passing argument 3 of 'config_setting_lookup_int64' from incompatible pointer type

To solve the problem, I tried to write:

config_setting_lookup_int64(file, "myvariable", myvariable);

But I can see another warning: passing argument 3 of 'config_setting_lookup_int64' makes pointer from integer without a cast. How can I solve the problem? Thank you so much!

  • it's the libconfig function int config_lookup_int64 (const config t * config, [Function] const char * path, long long * value) –  Jul 31 '21 at 07:54
  • 2
    so why don't you make `myvariable` `long long`? C is generally more strict about pointer types so if it asks for `long long *` you're going to need to pass a `long long *`. – mediocrevegetable1 Jul 31 '21 at 07:55
  • you're right! I was not careful! my fault! –  Jul 31 '21 at 07:57

0 Answers0