[patch] small fix to stop gcc warning for lib/libstand/assert.c
Alexander Best
alexbestms at wwu.de
Sat Mar 13 13:52:29 UTC 2010
hello,
this patch fixes the following gcc warning:
/usr/src/lib/libstand/assert.c:43: warning: implicit declaration of function
'exit'
by using abort() instead of exit() (which is illegal anyway). looking at
lib/libc/gen/assert.c abort() seems save to use instead of exit().
cheers.
alex
-------------- next part --------------
Index: lib/libstand/assert.c
===================================================================
--- lib/libstand/assert.c (revision 205121)
+++ lib/libstand/assert.c (working copy)
@@ -40,5 +40,5 @@
else
printf("Assertion failed: (%s), function %s, file %s, line "
"%d.\n", expression, func, file, line);
- exit();
+ abort();
}
Index: lib/libstand/stand.h
===================================================================
--- lib/libstand/stand.h (revision 205121)
+++ lib/libstand/stand.h (working copy)
@@ -265,6 +265,7 @@
extern char *optarg; /* getopt(3) external variables */
extern int optind, opterr, optopt, optreset;
extern int getopt(int, char * const [], const char *);
+extern void abort(void);
/* pager.c */
extern void pager_open(void);
More information about the freebsd-hackers
mailing list