[gnome-builder/wip/gtk4-port: 707/736] libide/core: cast before string comparisons




commit 7964df76869b4bffdd463f91cc56a93cd8ed1d0f
Author: Christian Hergert <chergert redhat com>
Date:   Thu Apr 21 13:33:35 2022 -0700

    libide/core: cast before string comparisons
    
    So that these can be used with xmlChar without being annoying.

 src/libide/core/ide-macros.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/core/ide-macros.h b/src/libide/core/ide-macros.h
index 198906be3..6d85f5d0f 100644
--- a/src/libide/core/ide-macros.h
+++ b/src/libide/core/ide-macros.h
@@ -35,8 +35,8 @@
 G_BEGIN_DECLS
 
 #define ide_str_empty0(str)       (!(str) || !*(str))
-#define ide_str_equal(str1,str2)  (strcmp(str1,str2)==0)
-#define ide_str_equal0(str1,str2) (g_strcmp0(str1,str2)==0)
+#define ide_str_equal(str1,str2)  (strcmp((char*)str1,(char*)str2)==0)
+#define ide_str_equal0(str1,str2) (g_strcmp0((char*)str1,(char*)str2)==0)
 #define ide_strv_empty0(strv)     (((strv) == NULL) || ((strv)[0] == NULL))
 #define ide_set_string(ptr,str)   (ide_take_string((ptr), g_strdup(str)))
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]