All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xsm: fix clang build
@ 2018-09-05 14:46 Roger Pau Monne
  2018-09-06 16:16 ` Wei Liu
  2018-09-07 20:48 ` [Non-DoD Source] " DeGraaf, Daniel G
  0 siblings, 2 replies; 3+ messages in thread
From: Roger Pau Monne @ 2018-09-05 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Daniel De Graaf, Roger Pau Monne

ebitmap.c:244:32: error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier]
               "match my size %Zd (high bit was %d)\n", mapunit,
                              ~^
ebitmap.c:245:16: error: format specifies type 'int' but the argument has type 'unsigned long'
      [-Werror,-Wformat]
               sizeof(u64) * 8, e->highbit);
               ^~~~~~~~~~~~~~~
ebitmap.c:245:33: error: data argument not used by format string [-Werror,-Wformat-extra-args]
               sizeof(u64) * 8, e->highbit);

Use %zd instead of %Zd, which is compliant with C99.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 xen/xsm/flask/ss/ebitmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/xsm/flask/ss/ebitmap.c b/xen/xsm/flask/ss/ebitmap.c
index bb3ec8e7c9..e1d0a586a7 100644
--- a/xen/xsm/flask/ss/ebitmap.c
+++ b/xen/xsm/flask/ss/ebitmap.c
@@ -241,7 +241,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
     if ( mapunit != sizeof(u64) * 8 )
     {
         printk(KERN_ERR "Flask: ebitmap: map size %u does not "
-               "match my size %Zd (high bit was %d)\n", mapunit,
+               "match my size %zd (high bit was %d)\n", mapunit,
                sizeof(u64) * 8, e->highbit);
         goto bad;
     }
-- 
2.18.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xsm: fix clang build
  2018-09-05 14:46 [PATCH] xsm: fix clang build Roger Pau Monne
@ 2018-09-06 16:16 ` Wei Liu
  2018-09-07 20:48 ` [Non-DoD Source] " DeGraaf, Daniel G
  1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2018-09-06 16:16 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Daniel De Graaf, Wei Liu

On Wed, Sep 05, 2018 at 04:46:06PM +0200, Roger Pau Monne wrote:
> ebitmap.c:244:32: error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier]
>                "match my size %Zd (high bit was %d)\n", mapunit,
>                               ~^
> ebitmap.c:245:16: error: format specifies type 'int' but the argument has type 'unsigned long'
>       [-Werror,-Wformat]
>                sizeof(u64) * 8, e->highbit);
>                ^~~~~~~~~~~~~~~
> ebitmap.c:245:33: error: data argument not used by format string [-Werror,-Wformat-extra-args]
>                sizeof(u64) * 8, e->highbit);
> 
> Use %zd instead of %Zd, which is compliant with C99.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Non-DoD Source] [PATCH] xsm: fix clang build
  2018-09-05 14:46 [PATCH] xsm: fix clang build Roger Pau Monne
  2018-09-06 16:16 ` Wei Liu
@ 2018-09-07 20:48 ` DeGraaf, Daniel G
  1 sibling, 0 replies; 3+ messages in thread
From: DeGraaf, Daniel G @ 2018-09-07 20:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Daniel De Graaf, 'Roger Pau Monne'

> -----Original Message-----
> From: Roger Pau Monne <roger.pau@citrix.com>
> Sent: Wednesday, September 5, 2018 10:46 AM
> To: xen-devel@lists.xenproject.org
> Cc: Roger Pau Monne <roger.pau@citrix.com>; Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Subject: [Non-DoD Source] [PATCH] xsm: fix clang build
> 
> ebitmap.c:244:32: error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier]
>                "match my size %Zd (high bit was %d)\n", mapunit,
>                               ~^
> ebitmap.c:245:16: error: format specifies type 'int' but the argument has type 'unsigned long'
>       [-Werror,-Wformat]
>                sizeof(u64) * 8, e->highbit);
>                ^~~~~~~~~~~~~~~
> ebitmap.c:245:33: error: data argument not used by format string [-Werror,-Wformat-extra-args]
>                sizeof(u64) * 8, e->highbit);
> 
> Use %zd instead of %Zd, which is compliant with C99.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-07 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 14:46 [PATCH] xsm: fix clang build Roger Pau Monne
2018-09-06 16:16 ` Wei Liu
2018-09-07 20:48 ` [Non-DoD Source] " DeGraaf, Daniel G

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.