Hi David,

David Crosby wrote on Thu, Jul 03, 2014 at 07:44:12AM -0600:

> This little patch fixes a compiler warning
> (found with WARNINGS turned on),

A correct fix for that is below.

OK to commit it?

> unambiguates the printit function, and removes an unnecessary
> comment.

Even though we don't have lint(1) any longer, /* NOT REACHED */
is one of the comments that are occasionally considered useful
even for human eyes, to help reading and auditing code.

I think this is such a case, so I'd just leave the comment.

> Program behaviour the same.

No, it isn't, your patch is wrong.
There are three calls to printit(), and you only exit after one.

> This is my first patch to you folks, sorry if I screwed up somewhere.

No problem, when you start sending patches, expect that some get
rejected.  Just try to be diligent and don't give up.

Yours,
  Ingo


Index: caesar.c
===================================================================
RCS file: /cvs/src/games/caesar/caesar.c,v
retrieving revision 1.15
diff -u -p -r1.15 caesar.c
--- caesar.c    22 Feb 2010 18:57:42 -0000      1.15
+++ caesar.c    3 Jul 2014 19:49:42 -0000
@@ -61,8 +61,8 @@ double stdf[26] = {
        2.62, 0.81, 1.88, 0.23,  2.07, 0.06
 };
 
-void printit(int);
-void usage(void);
+__dead void printit(int);
+__dead void usage(void);
 
 
 int

Reply via email to