Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2010 14:52:19 +0100 (CET)
From:      Alexander Best <alexbestms@wwu.de>
To:        <freebsd-hackers@FreeBSD.org>
Subject:   [patch] small fix to stop gcc warning for lib/libstand/assert.c
Message-ID:  <permail-20100313135219f7e55a9d00006340-a_best01@message-id.uni-muenster.de>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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

[-- Attachment #2 --]
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);

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-20100313135219f7e55a9d00006340-a_best01>