[PATCH 1/6] build fix: unsigned long = %lX

Oleksij Rempel linux at rempel-privat.de
Sun Mar 17 14:14:25 EDT 2013


From: Oleksij Rempel <bug-track at fisher-privat.net>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 .../magpie_fw_dev/build/utility/bin2hex/bin2hex.c            | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
index 6fd2541..5d3b14c 100755
--- a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
+++ b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
@@ -23,7 +23,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char
         	    tmp_buf[2] = buf[i+2];
         	    tmp_buf[3] = buf[i+3];
 
-			fprintf(out, "0x%08X, ", *((unsigned long *)(&tmp_buf[0])));
+			fprintf(out, "0x%08lX, ", *((unsigned long *)(&tmp_buf[0])));
 
         } else {
             
@@ -34,7 +34,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char
 			tmp_buf[1] = buf[i+2];
 			tmp_buf[2] = buf[i+1];
 			tmp_buf[3] = buf[i+0];
-			fprintf(out, "0x%08X, ", *((unsigned long *)(&tmp_buf[0])));
+			fprintf(out, "0x%08lX, ", *((unsigned long *)(&tmp_buf[0])));
 		}
         checksum = checksum ^ *((unsigned long *)(&tmp_buf[0]));
 	}
@@ -58,7 +58,7 @@ void write_rom(FILE *out, FILE *in)
 		if( size == 0 )
 		{
 			if (multiple)
-				fprintf(out, "%08X\n", checksum);
+				fprintf(out, "%08lX\n", checksum);
 
 			goto ERR_DONE;
 		}
@@ -66,7 +66,7 @@ void write_rom(FILE *out, FILE *in)
 		{
 		    multiple = 0;
 			write_file(out, buffer, size, NULL, 1);
-			fprintf(out, "%08X\n", checksum);
+			fprintf(out, "%08lX\n", checksum);
 			goto ERR_DONE;
 		}
 		else if (size==MAX_READ_SIZE)
@@ -104,7 +104,7 @@ void write_array(FILE *out, FILE *in, unsigned char hif)
 		{
 			if (multiple)
 			{
-				fprintf(out, "0x%08X\n", checksum);
+				fprintf(out, "0x%08lX\n", checksum);
 				file_size += 4;
 			}
 
@@ -118,7 +118,7 @@ void write_array(FILE *out, FILE *in, unsigned char hif)
 			multiple = 0;
 
 			write_file(out, buffer, size, NULL, hif);
-			fprintf(out, "0x%08X\n", checksum);
+			fprintf(out, "0x%08lX\n", checksum);
 
 			if( (size%4)!=0 )
 			    file_size += (4-(size%4));
-- 
1.8.1.2




More information about the Ath9k_htc_fw mailing list