public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Warnings
@ 1999-11-18  7:45 Duane Ellis
  1999-11-18 23:45 ` Warnings Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Duane Ellis @ 1999-11-18  7:45 UTC (permalink / raw)
  To: insight

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-18 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-18  7:45 Warnings Duane Ellis
1999-11-18 23:45 ` Warnings Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).