From 20653908b053b006ddfb8d75f6890e59786501b0 Mon Sep 17 00:00:00 2001 From: Antoine Fontaine Date: Tue, 30 Mar 2021 20:26:34 +0200 Subject: [PATCH] Fix cast warning --- plugins/imagepng/plugin.cpp | 4 ++-- radiant/treemodel.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index 4bdf2b0a..449bbf1b 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -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, diff --git a/radiant/treemodel.cpp b/radiant/treemodel.cpp index 12441f0e..cbd529d4 100644 --- a/radiant/treemodel.cpp +++ b/radiant/treemodel.cpp @@ -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 { -- 2.39.2