I am trying to learn how to use the attribute unused so I created a little test program. Can you please tell me what is wrong? I get syntax errors "before attribute" and "before (" (sometimes).
thanks!
Code:
#include <stdio.h>
#define UNUSED _attribute_ ((unused))
void testUnused(int a UNUSED, int b);
int main()
{
//testUnused(2, 5); //i tried commenting this out, but still get syntax error
printf("hello\n");
}
void testUnused(int a UNUSED, int b)
{
printf("%d", b);
}
Comment