Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-20 Thread Marek Chalupa
On Fri, Jul 17, 2015 at 2:06 PM, Pekka Paalanen wrote: > On Wed, 1 Jul 2015 12:29:00 +0200 > Marek Chalupa wrote: > > > sizeof operator returns size_t, which need not to be unsigned int, but > can > > be long (long) unsigned int. > > So here the correct fix should be either to use %zu (since C99

Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-17 Thread Bryce Harrington
On Fri, Jul 17, 2015 at 03:25:55PM -0500, Derek Foreman wrote: > Looks fine to me. > > Reviewed-By: Derek Foreman Thanks, pushed: To ssh://git.freedesktop.org/git/wayland/weston 27135af..c683623 master -> master > On 19/06/15 06:28 PM, Bryce Harrington wrote: > > Addresses this warning fo

Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-17 Thread Bryce Harrington
On Fri, Jul 17, 2015 at 03:06:44PM +0300, Pekka Paalanen wrote: > On Wed, 1 Jul 2015 12:29:00 +0200 > Marek Chalupa wrote: > > > sizeof operator returns size_t, which need not to be unsigned int, but can > > be long (long) unsigned int. > > So here the correct fix should be either to use %zu (sin

Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-17 Thread Derek Foreman
Looks fine to me. Reviewed-By: Derek Foreman On 19/06/15 06:28 PM, Bryce Harrington wrote: > Addresses this warning found by Denis Denisov: > > [src/logind-util.c:702]: (warning) %d in format string (no. 1) > requires 'int' but the argument type is 'unsigned int'. > > Signed-off-by: Bryce

Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-17 Thread Pekka Paalanen
On Wed, 1 Jul 2015 12:29:00 +0200 Marek Chalupa wrote: > sizeof operator returns size_t, which need not to be unsigned int, but can > be long (long) unsigned int. > So here the correct fix should be either to use %zu (since C99) or cast it > to unsigned long and use %lu < SardemFF7> Why has siz

Re: [PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-07-01 Thread Marek Chalupa
sizeof operator returns size_t, which need not to be unsigned int, but can be long (long) unsigned int. So here the correct fix should be either to use %zu (since C99) or cast it to unsigned long and use %lu Regards, Marek On Sat, Jun 20, 2015 at 1:28 AM, Bryce Harrington wrote: > Addresses thi

[PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-06-19 Thread Bryce Harrington
Addresses this warning found by Denis Denisov: [src/logind-util.c:702]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Signed-off-by: Bryce Harrington --- src/logind-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src