linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/exec: Use %zu to format size_t
@ 2014-12-21 10:58 Geert Uytterhoeven
       [not found] ` <1419159496-11558-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-12-21 10:58 UTC (permalink / raw)
  To: David Drysdale, Shuah Khan, Andrew Morton
  Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

On 32-bit:

execveat.c: In function 'check_execveat_pathmax':
execveat.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'size_t'
execveat.c:187: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'

Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
---
 tools/testing/selftests/exec/execveat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c
index 33a5c06d95caa038..d273624c93a64254 100644
--- a/tools/testing/selftests/exec/execveat.c
+++ b/tools/testing/selftests/exec/execveat.c
@@ -179,11 +179,11 @@ static int check_execveat_pathmax(int dot_dfd, const char *src, int is_script)
 	 */
 	fd = open(longpath, O_RDONLY);
 	if (fd > 0) {
-		printf("Invoke copy of '%s' via filename of length %lu:\n",
+		printf("Invoke copy of '%s' via filename of length %zu:\n",
 			src, strlen(longpath));
 		fail += check_execveat(fd, "", AT_EMPTY_PATH);
 	} else {
-		printf("Failed to open length %lu filename, errno=%d (%s)\n",
+		printf("Failed to open length %zu filename, errno=%d (%s)\n",
 			strlen(longpath), errno, strerror(errno));
 		fail++;
 	}
-- 
1.9.1

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

* Re: [PATCH] selftests/exec: Use %zu to format size_t
       [not found] ` <1419159496-11558-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-12-22 18:14   ` Shuah Khan
       [not found]     ` <54985F6E.2010205-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2014-12-22 18:14 UTC (permalink / raw)
  To: Geert Uytterhoeven, David Drysdale, Andrew Morton
  Cc: linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 12/21/2014 03:58 AM, Geert Uytterhoeven wrote:
> On 32-bit:
> 
> execveat.c: In function 'check_execveat_pathmax':
> execveat.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'size_t'
> execveat.c:187: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'
> 
> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
>  tools/testing/selftests/exec/execveat.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c
> index 33a5c06d95caa038..d273624c93a64254 100644
> --- a/tools/testing/selftests/exec/execveat.c
> +++ b/tools/testing/selftests/exec/execveat.c
> @@ -179,11 +179,11 @@ static int check_execveat_pathmax(int dot_dfd, const char *src, int is_script)
>  	 */
>  	fd = open(longpath, O_RDONLY);
>  	if (fd > 0) {
> -		printf("Invoke copy of '%s' via filename of length %lu:\n",
> +		printf("Invoke copy of '%s' via filename of length %zu:\n",
>  			src, strlen(longpath));
>  		fail += check_execveat(fd, "", AT_EMPTY_PATH);
>  	} else {
> -		printf("Failed to open length %lu filename, errno=%d (%s)\n",
> +		printf("Failed to open length %zu filename, errno=%d (%s)\n",
>  			strlen(longpath), errno, strerror(errno));
>  		fail++;
>  	}
> 


Applied to kernel/git/shuah/linux-kselftest.git fixes
for 3.19-rc2

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978

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

* Re: [PATCH] selftests/exec: Use %zu to format size_t
       [not found]     ` <54985F6E.2010205-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
@ 2015-01-02 13:46       ` David Drysdale
  0 siblings, 0 replies; 3+ messages in thread
From: David Drysdale @ 2015-01-02 13:46 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Geert Uytterhoeven, Andrew Morton, Linux API,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Mon, Dec 22, 2014 at 6:14 PM, Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> wrote:
>
> On 12/21/2014 03:58 AM, Geert Uytterhoeven wrote:
> > On 32-bit:
> >
> > execveat.c: In function 'check_execveat_pathmax':
> > execveat.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'size_t'
> > execveat.c:187: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'
> >
> > Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> > ---
> >  tools/testing/selftests/exec/execveat.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c
> > index 33a5c06d95caa038..d273624c93a64254 100644
> > --- a/tools/testing/selftests/exec/execveat.c
> > +++ b/tools/testing/selftests/exec/execveat.c
> > @@ -179,11 +179,11 @@ static int check_execveat_pathmax(int dot_dfd, const char *src, int is_script)
> >        */
> >       fd = open(longpath, O_RDONLY);
> >       if (fd > 0) {
> > -             printf("Invoke copy of '%s' via filename of length %lu:\n",
> > +             printf("Invoke copy of '%s' via filename of length %zu:\n",
> >                       src, strlen(longpath));
> >               fail += check_execveat(fd, "", AT_EMPTY_PATH);
> >       } else {
> > -             printf("Failed to open length %lu filename, errno=%d (%s)\n",
> > +             printf("Failed to open length %zu filename, errno=%d (%s)\n",
> >                       strlen(longpath), errno, strerror(errno));
> >               fail++;
> >       }
> >
>
>
> Applied to kernel/git/shuah/linux-kselftest.git fixes
> for 3.19-rc2
>
> thanks,
> -- Shuah

Thanks for fixing, and apologies for the delay in responding.

Acked-by: David Drysdale <drysdale-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

> --
> Shuah Khan
> Sr. Linux Kernel Developer
> Open Source Innovation Group
> Samsung Research America (Silicon Valley)
> shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978

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

end of thread, other threads:[~2015-01-02 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-21 10:58 [PATCH] selftests/exec: Use %zu to format size_t Geert Uytterhoeven
     [not found] ` <1419159496-11558-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-12-22 18:14   ` Shuah Khan
     [not found]     ` <54985F6E.2010205-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2015-01-02 13:46       ` David Drysdale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).