Menu

#987 error: called object type 'int' is not a function or function pointer

closed-fixed
None
5
2014-10-09
2014-09-01
No

libgphoto2 2.5.5 and 2.5.5.1 do not build for me on OS X:

gphoto2-port.c:89:2: warning: implicit declaration of function 'GP_LOG_E' is invalid in C99 [-Wimplicit-function-declaration]
        C_PARAMS (port);
        ^
../gphoto2/gphoto2-port-log.h:205:3: note: expanded from macro 'C_PARAMS'
                GP_LOG_E ("Invalid parameters: '%s' is NULL/FALSE.", #PARAMS);\
                ^
gphoto2-port.c:91:9: warning: implicit declaration of function 'GP_LOG_D' is invalid in C99 [-Wimplicit-function-declaration]
        GP_LOG_D ("Creating new device...");
        ^
gphoto2-port.c:390:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (data, size);
        ~~~~~~~~~~~ ^
gphoto2-port.c:431:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (data, retval);
        ~~~~~~~~~~~ ^
gphoto2-port.c:466:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (data, retval);
        ~~~~~~~~~~~ ^
gphoto2-port.c:512:15: error: called object type 'int' is not a function or function pointer
                GP_LOG_DATA (data, retval);
                ~~~~~~~~~~~ ^
gphoto2-port.c:870:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (bytes, size);
        ~~~~~~~~~~~ ^
gphoto2-port.c:915:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (bytes, retval);
        ~~~~~~~~~~~ ^
gphoto2-port.c:945:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (bytes, size);
        ~~~~~~~~~~~ ^
gphoto2-port.c:993:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (bytes, retval);
        ~~~~~~~~~~~ ^
gphoto2-port.c:1026:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (bytes, size);
        ~~~~~~~~~~~ ^
gphoto2-port.c:1074:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (bytes, retval);
        ~~~~~~~~~~~ ^
gphoto2-port.c:1133:14: error: called object type 'int' is not a function or function pointer
        GP_LOG_DATA (cmd, cmd_size);
        ~~~~~~~~~~~ ^
gphoto2-port.c:1136:15: error: called object type 'int' is not a function or function pointer
                GP_LOG_DATA (data, data_size);
                ~~~~~~~~~~~ ^
gphoto2-port.c:1151:15: error: called object type 'int' is not a function or function pointer
                GP_LOG_DATA (sense, sense_size);
                ~~~~~~~~~~~ ^
gphoto2-port.c:1176:15: error: called object type 'int' is not a function or function pointer
                GP_LOG_DATA (data, data_size);
                ~~~~~~~~~~~ ^
2 warnings and 14 errors generated.

libgphoto2 2.5.4 builds fine on the same system.

Discussion

  • Marcus Meissner

    Marcus Meissner - 2014-09-02

    big logging cleanyup in 2.5.5 likely introduced this.

    do you build with gcc?

    try attached patch....

     
  • Hanspeter Niederstrasser

    Confirming that the attached patch fixes the libgphoto-2.5.5 build for me on OS X 10.9. On any OS X newer than 3 years, clang is the default compiler.

     
  • Ryan Carsten Schmidt

    Oops, I forgot to test the patch. Yes, it works for me too, and yes, I'm using clang too.

     
  • Marcus Meissner

    Marcus Meissner - 2014-10-09
    • status: open --> closed-fixed
    • assigned_to: Marcus Meissner
     
  • Marcus Meissner

    Marcus Meissner - 2014-10-09

    fixed for next release

     

Log in to post a comment.