Skip to contentSkip to conversation

af9035: fix warning

PATCH In review Gianluca Gennari 2 participants 2 messages Apr 3, 2012 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): GmailId1367538da899604d

#1 lore raw

PATCH v2 4/5 af9035: fix warning

On a 32 bit system:

af9035.c: In function 'af9035_download_firmware':
af9035.c:446:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat]

%zu avoids any warning on both 32 and 64 bit systems.

---
 drivers/media/dvb/dvb-usb/af9035.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/dvb-usb/af9035.c +1 -1
index f943c57..8bf6367 100644
@@ -443,7 +443,7 @@ static int af9035_download_firmware(struct usb_device *udev,
 
 		i -= hdr_data_len + HDR_SIZE;
 
-		pr_debug("%s: data uploaded=%lu\n", __func__, fw->size - i);
+		pr_debug("%s: data uploaded=%zu\n", __func__, fw->size - i);
 	}
 
 	/* firmware loaded, request boot */
Signature · 1 line
1.7.5.4
#2 lore raw
Quoted 9 lines · Gianluca Gennari

On a 32 bit system:

af9035.c: In function 'af9035_download_firmware':
af9035.c:446:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat]

%zu avoids any warning on both 32 and 64 bit systems.

Applied thanks!
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/af9035_experimental

regards
Antti

Signature · 1 line
http://palosaari.fi/