GCC 2.95.1 on SPARC/Solaris, at least, is clever enough to figure out
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 16 Apr 2001 22:06:34 +0000 (22:06 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 16 Apr 2001 22:06:34 +0000 (22:06 +0000)
that the loop in "lanalyzer_open()" is an infinite loop, so the "return
0;" at the end isn't necessary to suppress a compiler warning with that
compiler - and Sun C not only figures it out, it warns that the
"g_assert_not_reached()" and the "return 0;" are unreachable, so I'll
take them out for now (and put them back if my older GCC at home still
requires it to suppress warnings).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3310 f5534014-38df-0310-8fa8-9805f1628bb7

wiretap/lanalyzer.c

index 9ff11760b0ff3586db5295cf495bc6ffd3886167..44013670d4c349d4eaeb7d4412373274a64f3c07 100644 (file)
@@ -1,6 +1,6 @@
 /* lanalyzer.c
  *
- * $Id: lanalyzer.c,v 1.27 2001/03/10 06:33:57 guy Exp $
+ * $Id: lanalyzer.c,v 1.28 2001/04/16 22:06:34 guy Exp $
  *
  * Wiretap Library
  * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -188,10 +188,6 @@ int lanalyzer_open(wtap *wth, int *err)
                                ; /* no action */
                }
        } 
-
-       /* never gets here */
-       g_assert_not_reached();
-       return 0;
 }
 
 #define DESCRIPTOR_LEN 32