mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
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)
| ^~~~~~~~~~~~
22 lines
317 B
C
22 lines
317 B
C
/* This test made valgrind run in an infinite loop. See bugzilla #301204 */
|
|
#include <stdio.h>
|
|
|
|
static void mytest(int d)
|
|
{
|
|
printf("%d\n", d);
|
|
}
|
|
|
|
static void (*resolve_test(void))(int)
|
|
{
|
|
return mytest;
|
|
}
|
|
|
|
void test(int d)
|
|
__attribute__((ifunc("resolve_test")));
|
|
|
|
int main()
|
|
{
|
|
test(5);
|
|
return 0;
|
|
}
|