]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
none/tests/ifunc.c: Fix a compiler warning
authorBart Van Assche <bvanassche@acm.org>
Sun, 28 Feb 2021 04:35:51 +0000 (20:35 -0800)
committerBart Van Assche <bvanassche@acm.org>
Sun, 28 Feb 2021 04:40:50 +0000 (20:40 -0800)
Fix the following compiler warning:

ifunc.c:9:15: warning: 'ifunc' resolver for 'test' should return 'void (*)(int)' [-Wattribute-alias=]
    9 | static void (*resolve_test(void))(void)
      |               ^~~~~~~~~~~~

none/tests/ifunc.c

index 523d923a46fcd346840f84e26d1c4942381211f0..43a48d2a0660d3bff5412622a81b8a072f0b9ed7 100644 (file)
@@ -6,9 +6,9 @@ static void mytest(int d)
     printf("%d\n", d);
 }
 
-static void (*resolve_test(void))(void)
+static void (*resolve_test(void))(int)
 {
-    return (void (*)(void))&mytest;
+    return mytest;
 }
 
 void test(int d)