Skip to content

Commit fb91d58

Browse files
committed
fix: correct format specifiers and remove duplicate CMake option
- Fix %u -> %zu for size_t in Sending header and Sending EPG debug logs - Fix %u -> %d for int in Sending bytes debug log - Remove duplicate option(NETWORKING_DEBUG) and if(NETWORKING_DEBUG) blocks in CMakeLists.txt Addresses Copilot review comments on CCExtractor#2175.
1 parent 6d32a56 commit fb91d58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib_ccx/networking.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void net_send_header(const unsigned char *data, size_t len)
142142
assert(srv_sd > 0);
143143

144144
#ifdef NETWORKING_DEBUG
145-
fprintf(stderr, "Sending header (len = %u): \n", len);
145+
fprintf(stderr, "Sending header (len = %zu): \n", len);
146146
fprintf(stderr, "File created by %02X version %02X%02X\n", data[3], data[4], data[5]);
147147
fprintf(stderr, "File format revision: %02X%02X\n", data[6], data[7]);
148148
#endif
@@ -171,7 +171,7 @@ int net_send_cc(const unsigned char *data, int len, void *private_data, struct c
171171
assert(srv_sd > 0);
172172

173173
#ifdef NETWORKING_DEBUG
174-
fprintf(stderr, "[C] Sending %u bytes\n", len);
174+
fprintf(stderr, "[C] Sending %d bytes\n", len);
175175
#endif
176176

177177
if (write_block(srv_sd, BIN_DATA, data, len) <= 0)
@@ -323,7 +323,7 @@ void net_send_epg(
323323
end += c;
324324

325325
#ifdef NETWORKING_DEBUG
326-
fprintf(stderr, "[C] Sending EPG: %u bytes\n", len);
326+
fprintf(stderr, "[C] Sending EPG: %zu bytes\n", len);
327327
#endif
328328

329329
if (write_block(srv_sd, EPG_DATA, epg, len) <= 0)

0 commit comments

Comments
 (0)