IOMX.cpp:408:42: error: '#' is not followed by a macro parameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EmoBoiix3
    New Member
    • Apr 2012
    • 2

    IOMX.cpp:408:42: error: '#' is not followed by a macro parameter

    I have a problem with this section of the file:

    #define CHECK_INTERFACE (IOMX, data, reply) \
    do { if (!data.enforceI nterface(interf ace::getInterfa ceDescriptor()) ) { \
    LOGW("Call incorrectly routed to " #interface); \
    return PERMISSION_DENI ED; \
    } } while (0)

    It gives the error as slated in the title.....I don't understand what's wrong though.
  • planaria
    New Member
    • Apr 2012
    • 1

    #2
    I think the original source code before you modify is the following.

    #define CHECK_INTERFACE (interface, data, reply) \
    do { if (!data.enforceI nterface(interf ace::getInterfa ceDes criptor())) { \
    LOGW("Call incorrectly routed to " #interface); \
    return PERMISSION_DENI ED; \
    } } while (0)

    What do you want to do and modify it?

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Have you looked at the translaion unit passed to the compiler? That will show the code actually being compiled and you can then verify the macro was correctly expanded.

      Comment

      Working...