cryptutils

Cryptographic Software Utilities
git clone http://git.omkov.net/cryptutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2020-08-13 11:16:07
Commit0d6675f5fa4c5d5fdddb9df422e861f1d0c71be2
Parentd61a6194f6e597a4a6b1be3658c43624edabd7de

lib: Add _Noreturn specifier to error function

Diffstat

M src/lib/error.c | 4 ++--
M src/lib/error.h | 4 ++--

2 files changed, 4 insertions, 4 deletions

diff --git a/src/lib/error.c b/src/lib/error.c
index 3b3b0a1..f246723 100644
--- a/src/lib/error.c
+++ b/src/lib/error.c
@@ -1,4 +1,4 @@
-// error.c, version 1.0.0
+// error.c, version 1.0.1
 // Error source file for OMKOV lib
 // Copyright (C) 2020, Jakob Wakeling
 // All rights reserved.
@@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
 
 char *A0 = NULL;
 
-void error(int status, const char *format, ...) {
+_Noreturn void error(int status, const char *format, ...) {
 	fflush(stdout); if (A0) { fputs(A0, stderr); fputs(": ", stderr); }
 	va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap);
 	fputc('\n', stderr); exit(status);
diff --git a/src/lib/error.h b/src/lib/error.h
index 4681348..d0d4585 100644
--- a/src/lib/error.h
+++ b/src/lib/error.h
@@ -1,4 +1,4 @@
-// error.h, version 1.0.0
+// error.h, version 1.0.1
 // Error header file for OMKOV lib
 // Copyright (C) 2020, Jakob Wakeling
 // All rights reserved.
@@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
 
 extern char *A0;
 
-extern void error(int status, const char *format, ...);
+extern _Noreturn void error(int status, const char *format, ...);
 extern void warn(const char *format, ...);
 
 extern char *serr(void);