]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
gtx: Avoid incomplete function type in casts
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 26 Jul 2019 20:57:02 +0000 (14:57 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sat, 25 Jan 2020 20:45:26 +0000 (15:45 -0500)
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.

Reviewed-on: https://gerrit.openafs.org/13726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit d6262c3f391e4176bec207fd0e8d4d6091a7f4e2)

Change-Id: I4544c37591bb68ff6bbe345192490bb79c843fc5
Reviewed-on: https://gerrit.openafs.org/13749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/gtx/gtxtest.c

index 3626a36d7aa51759c5aab551d33b6bf4a4927d31..64876e7c7734b492d3655c74764a1463b1718aa4 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");