From mboxrd@z Thu Jan 1 00:00:00 1970 From: Duane Ellis To: insight@sourceware.cygnus.com Subject: Warnings Date: Thu, 18 Nov 1999 07:45:00 -0000 Message-id: <199911181535.KAA02806@mars.franklin.com> X-SW-Source: 1999-q4/msg00058.html Here at Franklin, we have an internal requirement that *ALL* code we write is compiles with no warnings or errors and with these options: -Wall -Wmissing-prototypes -Wstrict-prototypes and in most cases, -Werror also. The *ONLY* exception to the -Werror is when there is a problem system header file that issues warnings. {ie: X window header files) One thing that always shows up when building Insight - and it's many tools is this warning/error: utils.c:2938: warning: unused parameter `arg' utils.c:2939: warning: unused parameter `from_tty' There are *LOTS* of these, sorting through *THESE* warnings and other warnings/problems that I am introducing is a real P.I.T.A. ------------------------------------------------------------ We have a standard way of getting rid of this here. Add the following to "defs.h" #define GDB_UNUSED_PARM( NAME ) (void)(NAME) Then, in function in this example in utils.c" would look like this: static void pagination_off_command (arg, from_tty) char *arg; int from_tty; { GDB_UNUSED_PARAM( arg ); GDB_UNUSED_PARAM( from_tty ); pagination_enabled = 0; } ------------------------------------------------------------ Have you guys thought of adding these changes to Insight? -Duane.