diff mbox series

[v2,1/8] stubdom/vtpm: include stdio.h for declaration of printf

Message ID 20191002170543.26571-2-olaf@aepfle.de (mailing list archive)
State New, archived
Headers show
Series tools, doc and stubdom fixes | expand

Commit Message

Olaf Hering Oct. 2, 2019, 5:05 p.m. UTC
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'

Signed-off-by: Olaf Hering <olaf@aepfle.de>
cked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 stubdom/vtpm/vtpmblk.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Samuel Thibault Oct. 13, 2019, 4:20 p.m. UTC | #1
Olaf Hering, le mer. 02 oct. 2019 19:05:36 +0200, a ecrit:
> 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'
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> cked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  stubdom/vtpm/vtpmblk.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/stubdom/vtpm/vtpmblk.c b/stubdom/vtpm/vtpmblk.c
> index fe529ab5ac..681f0c01b6 100644
> --- a/stubdom/vtpm/vtpmblk.c
> +++ b/stubdom/vtpm/vtpmblk.c
> @@ -20,6 +20,7 @@
>  #include <unistd.h>
>  #include <errno.h>
>  #include <fcntl.h>
> +#include <stdio.h>
>  
>  /*Encryption key and block sizes */
>  #define BLKSZ 16
>
Samuel Thibault Oct. 13, 2019, 4:21 p.m. UTC | #2
Samuel Thibault, le dim. 13 oct. 2019 18:20:39 +0200, a ecrit:
> Olaf Hering, le mer. 02 oct. 2019 19:05:36 +0200, a ecrit:
> > 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'
> > 
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > cked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Note that you miss an 'A' at the beginning of the line there.



> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> 
> > ---
> >  stubdom/vtpm/vtpmblk.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/stubdom/vtpm/vtpmblk.c b/stubdom/vtpm/vtpmblk.c
> > index fe529ab5ac..681f0c01b6 100644
> > --- a/stubdom/vtpm/vtpmblk.c
> > +++ b/stubdom/vtpm/vtpmblk.c
> > @@ -20,6 +20,7 @@
> >  #include <unistd.h>
> >  #include <errno.h>
> >  #include <fcntl.h>
> > +#include <stdio.h>
> >  
> >  /*Encryption key and block sizes */
> >  #define BLKSZ 16
> > 
> 
> -- 
> Samuel
> <P> moo
> <N> moo ?
> <D> P: keski t'arrive? :))
> <P> moooo
> <N> moooooo ?
> <P> rien le net marche je suis content :)
>  -+- #ens-mim - accro du net -+-
Olaf Hering Oct. 13, 2019, 4:50 p.m. UTC | #3
Am Sun, 13 Oct 2019 18:21:27 +0200
schrieb Samuel Thibault <samuel.thibault@ens-lyon.org>:

> > > cked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>  
> 
> Note that you miss an 'A' at the beginning of the line there.

Thanks for spotting.

Should I resend this patch?

Olaf
Samuel Thibault Oct. 13, 2019, 4:55 p.m. UTC | #4
Olaf Hering, le dim. 13 oct. 2019 18:50:32 +0200, a ecrit:
> Am Sun, 13 Oct 2019 18:21:27 +0200
> schrieb Samuel Thibault <samuel.thibault@ens-lyon.org>:
> 
> > > > cked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>  
> > 
> > Note that you miss an 'A' at the beginning of the line there.
> 
> Thanks for spotting.
> 
> Should I resend this patch?

With the fixed Acked-by and my Reviewed-by, yes.

Samuel
Wei Liu Oct. 14, 2019, 9:02 a.m. UTC | #5
Cc Juergen.

Looks pretty harmless for 4.13.

On Mon, 14 Oct 2019 at 05:23, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
> Olaf Hering, le dim. 13 oct. 2019 18:50:32 +0200, a ecrit:
> > Am Sun, 13 Oct 2019 18:21:27 +0200
> > schrieb Samuel Thibault <samuel.thibault@ens-lyon.org>:
> >
> > > > > cked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> > >
> > > Note that you miss an 'A' at the beginning of the line there.
> >
> > Thanks for spotting.
> >
> > Should I resend this patch?
>
> With the fixed Acked-by and my Reviewed-by, yes.
>
> Samuel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
Jürgen Groß Oct. 14, 2019, 1:40 p.m. UTC | #6
On 14.10.19 11:02, Wei Liu wrote:
> Cc Juergen.
> 
> Looks pretty harmless for 4.13.

Yes.

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen
diff mbox series

Patch

diff --git a/stubdom/vtpm/vtpmblk.c b/stubdom/vtpm/vtpmblk.c
index fe529ab5ac..681f0c01b6 100644
--- a/stubdom/vtpm/vtpmblk.c
+++ b/stubdom/vtpm/vtpmblk.c
@@ -20,6 +20,7 @@ 
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stdio.h>
 
 /*Encryption key and block sizes */
 #define BLKSZ 16