aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/42_function_pointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests2/42_function_pointer.c')
-rw-r--r--tests/tests2/42_function_pointer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/tests2/42_function_pointer.c b/tests/tests2/42_function_pointer.c
index 49c331b..697bd79 100644
--- a/tests/tests2/42_function_pointer.c
+++ b/tests/tests2/42_function_pointer.c
@@ -8,9 +8,13 @@ int fred(int p)
int (*f)(int) = &fred;
+/* To test what this is supposed to test the destination function
+ (fprint here) must not be called directly anywhere in the test. */
+int (*fprintfptr)(FILE *, const char *, ...) = &fprintf;
+
int main()
{
- printf("%d\n", (*f)(24));
+ fprintfptr(stdout, "%d\n", (*f)(24));
return 0;
}