OTHER: #include <stdio.h> for fprintf #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fails to build with: gcc (Debian 8.2.0-10) 8.2.0
gcc
pkg-config --cflags xmms2-client glib-2.0
-Wall -c -o tut1.o tut1.ctut1.c: In function ‘main’:
tut1.c:69:3: warning: implicit declaration of function ‘fprintf’ [-Wimplicit-function-declaration]
fprintf (stderr, "OOM!\n");
^~~~~~~
tut1.c:69:3: warning: incompatible implicit declaration of built-in function ‘fprintf’
tut1.c:69:3: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
tut1.c:21:1:
+#include <stdio.h>
tut1.c:69:3:
fprintf (stderr, "OOM!\n");
^~~~~~~
tut1.c:69:12: error: ‘stderr’ undeclared (first use in this function)
fprintf (stderr, "OOM!\n");
^~~~~~
tut1.c:69:12: note: ‘stderr’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
tut1.c:69:12: note: each undeclared identifier is reported only once for each function it appears in
tut1.c:86:3: warning: incompatible implicit declaration of built-in function ‘fprintf’
fprintf (stderr, "Connection failed: %s\n",
^~~~~~~
tut1.c:86:3: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
tut1.c:121:3: warning: incompatible implicit declaration of built-in function ‘fprintf’
fprintf (stderr, "playback start returned error, %s",
^~~~~~~
tut1.c:121:3: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
make: *** [Makefile:7: tut1.o] Error 1