Source-Changes-HG archive

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

[src/trunk]: src/games/atc Don't use ++ to set flags to true. Now passes -Wst...



details:   https://anonhg.NetBSD.org/src/rev/24f8578d2fd5
branches:  trunk
changeset: 781995:24f8578d2fd5
user:      dholland <dholland%NetBSD.org@localhost>
date:      Fri Oct 12 10:44:20 2012 +0000

description:
Don't use ++ to set flags to true. Now passes -Wstrict-overflow.

diffstat:

 games/atc/main.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r 7bbc1962c968 -r 24f8578d2fd5 games/atc/main.c
--- a/games/atc/main.c  Fri Oct 12 10:38:53 2012 +0000
+++ b/games/atc/main.c  Fri Oct 12 10:44:20 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.20 2009/08/12 04:48:03 dholland Exp $       */
+/*     $NetBSD: main.c,v 1.21 2012/10/12 10:44:20 dholland Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -51,7 +51,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.20 2009/08/12 04:48:03 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.21 2012/10/12 10:44:20 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -90,17 +90,17 @@
                case '?':
                case 'u':
                default: 
-                       f_usage++;
+                       f_usage = 1;
                        break;
                case 'l':
-                       f_list++;
+                       f_list = 1;
                        break;
                case 's':
                case 't':
-                       f_showscore++;
+                       f_showscore = 1;
                        break;
                case 'p':
-                       f_printpath++;
+                       f_printpath = 1;
                        break;
                case 'r':
                        seed = atoi(optarg);
@@ -112,7 +112,7 @@
                }
        }
        if (optind < argc)
-               f_usage++;
+               f_usage = 1;
        srandom(seed);
 
        if (f_usage)



Home | Main Index | Thread Index | Old Index