Fix: Remove compiler warnings (signedness, unused functions, snprintf truncation)
- Cast st_size to uint64_t to match file_size type in server.c - Remove unused functions: send_one_file, send_file_udp, verify_and_resend - Reduce rel buffer size to 1024 to prevent snprintf truncation in collect_files Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
+1
-1
@@ -353,7 +353,7 @@ void handle_client(int sock_fd, const char *dest_dir) {
|
||||
// Check if file already exists with same size and checksum (skip if so)
|
||||
struct stat existing_st;
|
||||
if (stat(target_path, &existing_st) == 0 &&
|
||||
existing_st.st_size == meta.file_size &&
|
||||
(uint64_t)existing_st.st_size == meta.file_size &&
|
||||
S_ISREG(existing_st.st_mode)) {
|
||||
// File exists with same size - check checksum
|
||||
uint64_t existing_checksum = fast_hash_file(target_path, meta.file_size);
|
||||
|
||||
Reference in New Issue
Block a user