Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
698:2c2b9c6eb089 | 699:01f40cb1057e |
---|---|
77 return -1; | 77 return -1; |
78 } | 78 } |
79 lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf), fp); | 79 lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf), fp); |
80 // lenTemp = fread(buf, sizeof(char), sizeof(buf), fp); | 80 // lenTemp = fread(buf, sizeof(char), sizeof(buf), fp); |
81 lenTotal = lenTemp; | 81 lenTotal = lenTemp; |
82 printf("%d bytes read (hex: %#x )\n", lenTemp,lenTemp); | 82 printf("%d bytes read (hex: %#x )\n", (uint32_t)lenTemp, (uint32_t)lenTemp); |
83 fclose(fp); | 83 fclose(fp); |
84 | 84 |
85 if(file2) | 85 if(file2) |
86 { | 86 { |
87 if (NULL == (fp = fopen(file2, "rb"))) | 87 if (NULL == (fp = fopen(file2, "rb"))) |
89 printf("Unable to open %s for reading\n", file2); | 89 printf("Unable to open %s for reading\n", file2); |
90 return -1; | 90 return -1; |
91 } | 91 } |
92 lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf)-lenTotal, fp); | 92 lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf)-lenTotal, fp); |
93 lenTotal += lenTemp; | 93 lenTotal += lenTemp; |
94 printf("%d bytes read (hex: %#x )\n", lenTemp,lenTemp); | 94 printf("%d bytes read (hex: %#x )\n", (uint32_t)lenTemp, (uint32_t)lenTemp); |
95 fclose(fp); | 95 fclose(fp); |
96 } | 96 } |
97 if(file3) | 97 if(file3) |
98 { | 98 { |
99 if (NULL == (fp = fopen(file3, "rb"))) | 99 if (NULL == (fp = fopen(file3, "rb"))) |
101 printf("Unable to open %s for reading\n", file3); | 101 printf("Unable to open %s for reading\n", file3); |
102 return -1; | 102 return -1; |
103 } | 103 } |
104 lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf)-lenTotal, fp); | 104 lenTemp = fread(&buf[lenTotal], sizeof(char), sizeof(buf)-lenTotal, fp); |
105 lenTotal += lenTemp; | 105 lenTotal += lenTemp; |
106 printf("%d bytes read (hex: %#x )\n", lenTemp,lenTemp); | 106 printf("%d bytes read (hex: %#x )\n", (uint32_t)lenTemp, (uint32_t)lenTemp); |
107 fclose(fp); | 107 fclose(fp); |
108 } | 108 } |
109 | 109 |
110 printf("\n"); | 110 printf("\n"); |
111 printf("%d bytes read (hex: %#x ) total \n", lenTotal,lenTotal); | 111 printf("%d bytes read (hex: %#x ) total \n", (uint32_t)lenTotal, (uint32_t)lenTotal); |
112 | 112 |
113 time_t rawtime; | 113 time_t rawtime; |
114 time (&rawtime); | 114 time (&rawtime); |
115 struct tm *timeinfo; | 115 struct tm *timeinfo; |
116 timeinfo = localtime(&rawtime); | 116 timeinfo = localtime(&rawtime); |