]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
Fix some format string warnings on x86_64.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index c2c3274607abfb89631b76c407d7d4c02efb905c..866f269f0081219f012e60374cb466c7e64fcd1e 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2,7 +2,9 @@
 #include "error.h"
 #include <sys/mman.h>
 #include <fnmatch.h>
+#include "afh.h"
 #include "afs.h"
+#include "net.h"
 #include "string.h"
 
 int mp3_get_file_info(char *map, size_t numbytes,
@@ -1028,7 +1030,7 @@ out:
  * full list: list everything, including afsi, afhi, atts as clear text
  *
  * */
-int com_afs_ls(__a_unused int fd, int argc, const char **argv)
+int com_afs_ls(int fd, int argc, const char **argv)
 {
        int i, ret;
        unsigned flags = 0;
@@ -1134,7 +1136,7 @@ int com_afs_ls(__a_unused int fd, int argc, const char **argv)
        ret = send_option_arg_callback_request(&query, opts.num_patterns,
                argv + i, com_ls_callback, &ls_output);
        if (ret >= 0 && ls_output.data) {
-               printf("%s\n", (char *)ls_output.data);
+               send_buffer(fd, (char *)ls_output.data);
                free(ls_output.data);
        }
        return ret;
@@ -1192,7 +1194,7 @@ static void save_audio_file_info(HASH_TYPE *hash, const char *path,
 
        pos = AFTROW_PATH_OFFSET + path_len;
        PARA_DEBUG_LOG("size: %zu, afhi starts at %d\n", size, pos);
-       PARA_DEBUG_LOG("last afhi byte: %p, pos %d\n", buf + pos + afhi_size - 1,
+       PARA_DEBUG_LOG("last afhi byte: %p, pos %zu\n", buf + pos + afhi_size - 1,
                pos + afhi_size - 1);
        write_u16(buf + AFTROW_AFHI_OFFSET_POS, pos);
        save_afhi(afhi, buf + pos);
@@ -1435,7 +1437,7 @@ out_free:
        return ret;
 }
 
-int com_add(int fd, int argc, const char **argv)
+int com_add(int fd, int argc, char **argv)
 {
        int i, ret;
        struct private_add_data pad = {.fd = fd, .flags = 0};