LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] USB: ffs-test: fix header path
@ 2011-01-27 19:39 Davidlohr Bueso
  2011-01-27 19:53 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2011-01-27 19:39 UTC (permalink / raw)
  To: Michal Nazarewicz, Greg Kroah-Hartman; +Cc: LKML, linux-usb

From: Davidlohr Bueso <dave@gnu.org>

When compiling this program the functionfs.h header cannot be found, producing:
ffs-test.c:40: fatal error: linux/usb/functionfs.h: No such file or directory

This patch also fixes the following warning:
ffs-test.c:453: warning: format ‘%4d’ expects type ‘int’, but argument 3 has type ‘size_t’

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 tools/usb/ffs-test.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/usb/ffs-test.c b/tools/usb/ffs-test.c
index bbe2e3a..b5a4430 100644
--- a/tools/usb/ffs-test.c
+++ b/tools/usb/ffs-test.c
@@ -37,7 +37,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <linux/usb/functionfs.h>
+#include "../../include/linux/usb/functionfs.h"
 

 /******************** Little Endian Handling ********************************/
@@ -450,7 +450,7 @@ invalid:
 		    len, expected, *p);
 		for (p = buf, len = 0; len < nbytes; ++p, ++len) {
 			if (0 == (len % 32))
-				fprintf(stderr, "%4d:", len);
+				fprintf(stderr, "%4ld:", len);
 			fprintf(stderr, " %02x", *p);
 			if (31 == (len % 32))
 				fprintf(stderr, "\n");
-- 
1.7.1





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

* Re: [PATCH 1/2] USB: ffs-test: fix header path
  2011-01-27 19:39 [PATCH 1/2] USB: ffs-test: fix header path Davidlohr Bueso
@ 2011-01-27 19:53 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2011-01-27 19:53 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: Michal Nazarewicz, Greg Kroah-Hartman, LKML, linux-usb

On Thu, 27 Jan 2011, Davidlohr Bueso wrote:

> From: Davidlohr Bueso <dave@gnu.org>
> 
> When compiling this program the functionfs.h header cannot be found, producing:
> ffs-test.c:40: fatal error: linux/usb/functionfs.h: No such file or directory
> 
> This patch also fixes the following warning:
> ffs-test.c:453: warning: format ‘%4d’ expects type ‘int’, but argument 3 has type ‘size_t’

> @@ -450,7 +450,7 @@ invalid:
>  		    len, expected, *p);
>  		for (p = buf, len = 0; len < nbytes; ++p, ++len) {
>  			if (0 == (len % 32))
> -				fprintf(stderr, "%4d:", len);
> +				fprintf(stderr, "%4ld:", len);

Since len's type is size_t, shouldn't the format be %4z?

Alan Stern


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

end of thread, other threads:[~2011-01-27 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 19:39 [PATCH 1/2] USB: ffs-test: fix header path Davidlohr Bueso
2011-01-27 19:53 ` Alan Stern

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).