]> granicus.if.org Git - graphviz/commitdiff
lib/glcomp: fix -Wnon-literal-null-conversion with Clang
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Mar 2022 00:30:58 +0000 (17:30 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 27 Mar 2022 18:21:10 +0000 (11:21 -0700)
This was causing the CMake build (to be enabled in a future commit) on macOS to
fail.

Gitlab: #1836, #1854

lib/glcomp/glcompbutton.c

index 33290c1c9560a645d7ffdf730ed2da4d162e2e61..97de80a3c7a63111ad9623b5760719aae4506bda 100644 (file)
@@ -15,6 +15,7 @@
 #include <glcomp/glutils.h>
 #include <glcomp/glcompset.h>
 #include <common/memory.h>
+#include <stddef.h>
 #include <string.h>
 #include <GL/glut.h>
 
@@ -40,7 +41,7 @@ glCompButton *glCompButtonNew(glCompObj * par, GLfloat x, GLfloat y,
     p->common.height = h;
     p->status = 0;             //0 not pressed 1 pressed;
     p->groupid = 0;
-    p->common.callbacks.click = '\0';
+    p->common.callbacks.click = NULL;
     /*set event functions */
 
     p->common.functions.draw = (glcompdrawfunc_t)glCompButtonDraw;