]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'gcc10' into 'master'
authorThomas Debesse <dev@illwieckz.net>
Sat, 24 Apr 2021 01:10:57 +0000 (01:10 +0000)
committerThomas Debesse <dev@illwieckz.net>
Sat, 24 Apr 2021 01:10:57 +0000 (01:10 +0000)
GCC10

See merge request xonotic/netradiant!181

plugins/imagepng/plugin.cpp
radiant/treemodel.cpp
tools/heretic2/common/inout.c
tools/quake2/common/inout.c

index 4bdf2b0a9833d9c1ca7d7d3e902e25f739a4de47..449bbf1bca9d689fa810bf09c63f114b1baecc7a 100644 (file)
@@ -40,7 +40,7 @@ void user_error_fn( png_structp png_ptr, png_const_charp error_msg ){
        longjmp( png_jmpbuf(png_ptr), 0 );
 }
 
-void user_read_data( png_structp png_ptr, png_bytep data, png_uint_32 length ){
+void user_read_data( png_structp png_ptr, png_bytep data, png_size_t length ){
        png_bytep *p_p_fbuffer = (png_bytep*)png_get_io_ptr( png_ptr );
        memcpy( data, *p_p_fbuffer, length );
        *p_p_fbuffer += length;
@@ -80,7 +80,7 @@ Image* LoadPNGBuff( unsigned char* fbuffer ){
        }
 
        // configure the read function
-       png_set_read_fn( png_ptr, ( png_voidp ) & p_fbuffer, ( png_rw_ptr ) & user_read_data );
+       png_set_read_fn( png_ptr, (png_voidp) &p_fbuffer, &user_read_data );
 
        if ( setjmp( png_jmpbuf(png_ptr) ) ) {
                png_destroy_read_struct( &png_ptr, &info_ptr,
index 12441f0e7ee0f5523f005c79dc8c8c1642902011..cbd529d4a5b6290ee58bde0a666d9db73408c451 100644 (file)
@@ -984,7 +984,7 @@ static gboolean graph_tree_model_iter_parent( GraphTreeModel *tree_model, GtkTre
        return FALSE;
 }
 
-static GObjectClass *g_parent_class = 0;
+static GObjectClass *g_parent_class = nullptr;
 
 namespace
 {
index e0c14841163387ad761e1c7c0457f37de4f6a9b4..b6d272ffdf694588b7c572b0f425cae2d5e87890 100644 (file)
@@ -261,7 +261,7 @@ void FPrintf( int flag, char *buf ){
        static qboolean bGotXML = false;
        char level[2];
 
-       printf( buf );
+       printf( "%s", buf );
 
        // the following part is XML stuff only.. but maybe we don't want that message to go down the XML pipe?
        if ( flag == SYS_NOXML ) {
index e0c14841163387ad761e1c7c0457f37de4f6a9b4..b6d272ffdf694588b7c572b0f425cae2d5e87890 100644 (file)
@@ -261,7 +261,7 @@ void FPrintf( int flag, char *buf ){
        static qboolean bGotXML = false;
        char level[2];
 
-       printf( buf );
+       printf( "%s", buf );
 
        // the following part is XML stuff only.. but maybe we don't want that message to go down the XML pipe?
        if ( flag == SYS_NOXML ) {