2012-10-03 23:04:46

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH -next] asymmetric keys: fix printk format warning

From: Randy Dunlap <[email protected]>

Fix printk format warning in x509_cert_parser.c:

crypto/asymmetric_keys/x509_cert_parser.c: In function 'x509_note_OID':
crypto/asymmetric_keys/x509_cert_parser.c:113:3: warning: format '%zu' expects type 'size_t', but argument 2 has type 'long unsigned int'

Builds cleanly on i386 and x86_64.

Signed-off-by: Randy Dunlap <[email protected]>
Cc: David Howells <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: [email protected]
---
crypto/asymmetric_keys/x509_cert_parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20121003.orig/crypto/asymmetric_keys/x509_cert_parser.c
+++ linux-next-20121003/crypto/asymmetric_keys/x509_cert_parser.c
@@ -110,7 +110,7 @@ int x509_note_OID(void *context, size_t
if (ctx->last_oid == OID__NR) {
char buffer[50];
sprint_oid(value, vlen, buffer, sizeof(buffer));
- pr_debug("Unknown OID: [%zu] %s\n",
+ pr_debug("Unknown OID: [%lu] %s\n",
(unsigned long)value - ctx->data, buffer);
}
return 0;


2012-10-04 03:18:27

by Rusty Russell

[permalink] [raw]
Subject: Re: [PATCH -next] asymmetric keys: fix printk format warning

Stephen Rothwell <[email protected]> writes:

> [Lets also cc Rusty who committed the patch ...]
>
> On Wed, 03 Oct 2012 16:04:46 -0700 Randy Dunlap <[email protected]> wrote:
>>
>> From: Randy Dunlap <[email protected]>
>>
>> Fix printk format warning in x509_cert_parser.c:
>>
>> crypto/asymmetric_keys/x509_cert_parser.c: In function 'x509_note_OID':
>> crypto/asymmetric_keys/x509_cert_parser.c:113:3: warning: format '%zu' expects type 'size_t', but argument 2 has type 'long unsigned int'
>>
>> Builds cleanly on i386 and x86_64.

Thanks, applied.

Rusty.

2012-10-03 23:08:06

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH -next] asymmetric keys: fix printk format warning

[Lets also cc Rusty who committed the patch ...]

On Wed, 03 Oct 2012 16:04:46 -0700 Randy Dunlap <[email protected]> wrote:
>
> From: Randy Dunlap <[email protected]>
>
> Fix printk format warning in x509_cert_parser.c:
>
> crypto/asymmetric_keys/x509_cert_parser.c: In function 'x509_note_OID':
> crypto/asymmetric_keys/x509_cert_parser.c:113:3: warning: format '%zu' expects type 'size_t', but argument 2 has type 'long unsigned int'
>
> Builds cleanly on i386 and x86_64.
>
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: David Howells <[email protected]>
> Cc: Herbert Xu <[email protected]>
> Cc: [email protected]
> ---
> crypto/asymmetric_keys/x509_cert_parser.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20121003.orig/crypto/asymmetric_keys/x509_cert_parser.c
> +++ linux-next-20121003/crypto/asymmetric_keys/x509_cert_parser.c
> @@ -110,7 +110,7 @@ int x509_note_OID(void *context, size_t
> if (ctx->last_oid == OID__NR) {
> char buffer[50];
> sprint_oid(value, vlen, buffer, sizeof(buffer));
> - pr_debug("Unknown OID: [%zu] %s\n",
> + pr_debug("Unknown OID: [%lu] %s\n",
> (unsigned long)value - ctx->data, buffer);
> }
> return 0;
>

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.29 kB)
(No filename) (836.00 B)
Download all attachments