]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/inout.c
Add -werror option to q3map2 to make all warnings into errors
[xonotic/netradiant.git] / tools / quake3 / common / inout.c
index 58d42ed58fcee12321697918c90887b45ff37607..5ade8802ca7eac347f2ebe14f81c85b36c89802c 100644 (file)
@@ -56,6 +56,7 @@ socket_t *brdcst_socket;
 netmessage_t msg;
 
 qboolean verbose = qfalse;
+qboolean werror = qfalse;
 
 // our main document
 // is streamed through the network to Radiant
@@ -316,6 +317,11 @@ void Sys_FPrintf( int flag, const char *format, ... ){
        vsprintf( out_buffer, format, argptr );
        va_end( argptr );
 
+       if ( ( flag == SYS_WRN ) && ( werror == qtrue ) ) {
+               Error( out_buffer );
+               return;
+       }
+
        FPrintf( flag, out_buffer );
 }