diff ostc4pack/src/checksum_final_add_fletcher.cpp @ 699:01f40cb1057e

Cleanup warnings: The code still contained several warnings which have now been resolved. Big thank you to Thomas :-)
author Ideenmodellierer
date Tue, 18 Oct 2022 20:56:19 +0200
parents 1e707b34667e
children
line wrap: on
line diff
--- a/ostc4pack/src/checksum_final_add_fletcher.cpp	Sun Sep 25 21:13:45 2022 +0200
+++ b/ostc4pack/src/checksum_final_add_fletcher.cpp	Tue Oct 18 20:56:19 2022 +0200
@@ -79,7 +79,7 @@
 	lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf), fp);
 //	lenTemp = fread(buf, sizeof(char), sizeof(buf), fp);
 	lenTotal = lenTemp;
-	printf("%d bytes read (hex: %#x )\n", lenTemp,lenTemp);
+	printf("%d bytes read (hex: %#x )\n", (uint32_t)lenTemp, (uint32_t)lenTemp);
 	fclose(fp);
 
 	if(file2)
@@ -91,7 +91,7 @@
 		}
 		lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf)-lenTotal, fp);
 		lenTotal += lenTemp;
-		printf("%d bytes read (hex: %#x )\n", lenTemp,lenTemp);
+		printf("%d bytes read (hex: %#x )\n", (uint32_t)lenTemp, (uint32_t)lenTemp);
 		fclose(fp);
 	}
 	if(file3)
@@ -103,12 +103,12 @@
 		}
 		lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf)-lenTotal, fp);
 		lenTotal += lenTemp;
-		printf("%d bytes read (hex: %#x )\n", lenTemp,lenTemp);
+		printf("%d bytes read (hex: %#x )\n", (uint32_t)lenTemp, (uint32_t)lenTemp);
 		fclose(fp);
 	}
 
    	printf("\n");
-	printf("%d bytes read (hex: %#x ) total \n", lenTotal,lenTotal);
+	printf("%d bytes read (hex: %#x ) total \n", (uint32_t)lenTotal, (uint32_t)lenTotal);
 
 	time_t rawtime;
 	time (&rawtime);