Source-Changes-HG archive

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

[src/trunk]: src/games/gomoku gomoku: remove unreachable code at the end of main



details:   https://anonhg.NetBSD.org/src/rev/86883fdff0fb
branches:  trunk
changeset: 366239:86883fdff0fb
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu May 19 20:09:46 2022 +0000

description:
gomoku: remove unreachable code at the end of main

In C99 mode, lint accepts when control gets to the end of main without
returning a value.  It does not know anything about __dead though.

No binary change.

diffstat:

 games/gomoku/main.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 19e5460c20e8 -r 86883fdff0fb games/gomoku/main.c
--- a/games/gomoku/main.c       Thu May 19 19:52:56 2022 +0000
+++ b/games/gomoku/main.c       Thu May 19 20:09:46 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.39 2022/05/18 19:29:00 rillig Exp $ */
+/*     $NetBSD: main.c,v 1.40 2022/05/19 20:09:46 rillig Exp $ */
 
 /*
  * Copyright (c) 1994
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.39 2022/05/18 19:29:00 rillig Exp $");
+__RCSID("$NetBSD: main.c,v 1.40 2022/05/19 20:09:46 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -353,8 +353,6 @@
                }
        }
        quit();
-       /* NOTREACHED */
-       return 0;
 }
 
 static int



Home | Main Index | Thread Index | Old Index