diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-06-01 17:29:15 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-06-01 17:29:15 -0700 |
commit | 012115650d15697e1cdc13edf770ac9775b108f4 (patch) | |
tree | 6c06b1aa8e7c4f0af1b6cdbbb3eca0dfe6a3ed56 /xcalc.c | |
parent | 7a04d51cb90b9a314eea117bc36fedb2bfaab516 (diff) |
Fix -Wsign-compare warning in Syntax() function
Reported by gcc 7.3:
xcalc.c: In function ‘Syntax’:
xcalc.c:322:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i=0; i < XtNumber(Options); i++)
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xcalc.c')
-rw-r--r-- | xcalc.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -312,14 +312,12 @@ void Quit(void) */ static void Syntax(int argc, char **argv) { - register int i; - (void) fprintf(stderr, "%s: unknown options:", argv[0]); - for (i=1; i <argc; i++) + for (int i = 1; i <argc; i++) (void) fprintf(stderr, " %s", argv[i]); (void) fprintf(stderr, "\n\n"); (void) fprintf(stderr, "Usage: %s", argv[0]); - for (i=0; i < XtNumber(Options); i++) + for (Cardinal i = 0; i < XtNumber(Options); i++) (void) fprintf(stderr, " [%s]", Options[i].option); (void) fprintf(stderr, "\n"); XtDestroyApplicationContext(xtcontext); |