shithub: qk1

Download patch

ref: 2cf72989b0485bb960e4991cbd002787854a1e3f
parent: d68c16a284098755891b6c700dc4046b1c4cc808
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Nov 21 18:13:12 EST 2023

mark _Noreturn

--- a/fns.h
+++ b/fns.h
@@ -49,7 +49,7 @@
 int	opendm(char*, int);
 void	initfs(char **paths);
 #pragma varargck	argpos	fatal	1
-void	fatal(char*, ...);
+_Noreturn void	fatal(char*, ...);
 void*	emalloc(ulong);
 vlong	flen(int);
 double	dtime(void);
--- a/host.c
+++ b/host.c
@@ -84,7 +84,7 @@
 This shuts down both the client and server
 ================
 */
-void Host_Error (char *fmt, ...)
+_Noreturn void Host_Error (char *fmt, ...)
 {
 	va_list arg;
 	char s[1024];
--- a/mathlib.c
+++ b/mathlib.c
@@ -58,7 +58,6 @@
 		dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
 		break;
 	default:
-		dist1 = dist2 = 0;		// shut up compiler
 		fatal ("BoxOnPlaneSide:  Bad signbits");
 		break;
 	}
--- a/pr_edict.c
+++ b/pr_edict.c
@@ -109,7 +109,6 @@
 	if(i < 0 && i >= -num_prstr && prstr[-1-i] != nil)
 		return prstr[-1-i];
 	Host_Error("PR_Str: invalid offset %d", i);
-	return "";
 }
 
 /*
--- a/qk1.c
+++ b/qk1.c
@@ -29,7 +29,7 @@
 	return err;
 }
 
-void
+_Noreturn void
 fatal(char *fmt, ...)
 {
 	char s[1024];
--- a/quakedef.h
+++ b/quakedef.h
@@ -183,7 +183,7 @@
 void Host_InitCommands (void);
 void Host_Init (int argc, char **argv, char **paths);
 void Host_Shutdown(void);
-void Host_Error (char *error, ...);
+_Noreturn void Host_Error (char *error, ...);
 void Host_EndGame (char *message, ...);
 void Host_Frame (float time);
 void Host_Quit_f (void);
--- a/wad.c
+++ b/wad.c
@@ -98,7 +98,6 @@
 	}
 
 	fatal ("W_GetLumpinfo: %s not found", name);
-	return nil;
 }
 
 void *W_GetLumpName (char *name)