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:
Theo Tappe
2026-06-24 12:42:12 +02:00
parent 64fa6ee9dd
commit bc46269f37
4 changed files with 2 additions and 149 deletions
+1 -1
View File
@@ -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);