@@ -578,7 +578,7 @@ static size_t _webui_strlen(const char* s);
578578static uint16_t _webui_get_run_id (void );
579579static uint16_t _webui_get_ws_process_number (void );
580580static void * _webui_malloc (size_t size );
581- static void * _webui_malloc_if_not_exist (void * ptr , size_t size );
581+ static void * _webui_malloc_if_not_exist (const void * ptr , size_t size );
582582static void _webui_sleep (long unsigned int ms );
583583static size_t _webui_find_the_best_browser (_webui_window_t * win );
584584static bool _webui_is_process_running (const char * process_name );
@@ -4684,7 +4684,7 @@ void* webui_interface_get_context(size_t window, size_t event_number) {
46844684}
46854685
46864686// -- Core's Functions ----------------
4687- static bool _webui_ptr_exist (void * ptr ) {
4687+ static bool _webui_ptr_exist (const void * ptr ) {
46884688
46894689 #ifdef WEBUI_LOG_VERBOSE
46904690 _webui_log_debug ("[Core]\t\t_webui_ptr_exist()\n" );
@@ -4816,7 +4816,7 @@ static void _webui_panic(char* msg) {
48164816 webui_exit ();
48174817}
48184818
4819- static void * _webui_malloc_if_not_exist (void * ptr , size_t size ) {
4819+ static void * _webui_malloc_if_not_exist (const void * ptr , size_t size ) {
48204820
48214821 #ifdef WEBUI_LOG_VERBOSE
48224822 // _webui_log_debug("[Core]\t\t_webui_malloc_if_not_exist(0x%p, [%zu])\n", ptr, size);
@@ -4827,7 +4827,7 @@ static void* _webui_malloc_if_not_exist(void* ptr, size_t size) {
48274827 _webui_mutex_unlock (& _webui .mutex_mem );
48284828
48294829 if (exist )
4830- return ptr ; // Pointer already exist, No need to malloc again.
4830+ return ( void * ) ptr ; // Pointer already exist, No need to malloc again.
48314831
48324832 // Pointer not exist, malloc new memory
48334833 return _webui_malloc (size );
0 commit comments