Module compile problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi 

I think I have a compiler problem, but its when I'm compiling a module so I
thought I'd try here to start with.
I can compile my driver module OK on Redhat8.0 (gcc v3.2).

However, when I compile the same code on SuSe8.0 (gcc v2.95.3) then I get
back the following compile error message:

mymod.c:128: parse error before `)'


Line 128 is:

  MSG("ENTER: mymod_open()\n");

However, if I change the line to take a parameter:

  MSG("ENTER: mymod_open(%i)\n", num);

then it compiles without error.


I have defined MSG in a header file like this:

#ifdef DEBUG
#define MSG(string, args...)  printk(KERN_INFO "MYMOD[%lu]: "string,
jiffies, ##args)
#else
#define MSG(string, args...)
#endif


Anyone have any ideas why I see a problem when there is no parameters, and
how I can fix it for both compiler versions ?

thanks
dom

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux