Skip to contentSkip to conversation

stubdom/vtpm: include stdio.h for declaration of printf

PATCH New Olaf Hering 1 participant 1 message May 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stubdom/vtpm: include stdio.h for declaration of printf

The function read_vtpmblk uses printf(3), but stdio.h is not included in this file. This results in a warning from gcc-7:

vtpmblk.c: In function 'read_vtpmblk':
vtpmblk.c:322:7: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]

       printf("Expected: ");

vtpmblk.c:322:7: warning: incompatible implicit declaration of built-in function 'printf' vtpmblk.c:322:7: note: include '<stdio.h>' or provide a declaration of 'printf'

---
 stubdom/vtpm/vtpmblk.c | 1 +
 1 file changed, 1 insertion(+)
stubdom/vtpm/vtpmblk.c +1 -0
index fe529ab5ac..681f0c01b6 100644
@@ -20,6 +20,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stdio.h>
 
 /*Encryption key and block sizes */
 #define BLKSZ 16

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel