gtx: Avoid incomplete function type in casts 26/13726/2
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 26 Jul 2019 20:57:02 +0000 (14:57 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 2 Aug 2019 15:29:06 +0000 (11:29 -0400)
clang complains that these casts contain an incomplete function type
(since the function argument is omitted rather than declared to be
void).  Since we just need the cast to pointer type, let the compiler
do it implicitly and pass stock NULL, rather than trying to force a
cast to function-pointer type.

Change-Id: Ia2a4cf61d51faef3b4cd469133d9143ca5f57185
Reviewed-on: https://gerrit.openafs.org/13726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/gtx/gtxtest.c

index 3626a36..64876e7 100644 (file)
@@ -234,7 +234,7 @@ main(int argc, char **argv)
     keymap_BindToString(frameB->keymap, "a", SwitchToACmd, NULL, NULL);
     keymap_BindToString(frameB->keymap, "b", StupidCmd, NULL, NULL);
     keymap_BindToString(frameB->keymap, "d", NoCallCmd, NULL, NULL);
-    keymap_BindToString(frameB->keymap, "d", (int (*)())0, NULL, NULL);
+    keymap_BindToString(frameB->keymap, "d", NULL, NULL, NULL);
     keymap_BindToString(frameB->keymap, "\033d", NoCallCmd, NULL, NULL);
     gtxframe_AddMenu(frameB, "FrameA", "a");