[gnome-builder/wip/gtk4-port: 689/1774] libide/core: cast before string comparisons
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 689/1774] libide/core: cast before string comparisons
- Date: Mon, 11 Jul 2022 22:31:20 +0000 (UTC)
commit 5822a0ddb11a2be7df72d2621c633f1a2d147f82
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]