From 941fbbbf695efff2c78765d8d0c415ae19b516a1 Mon Sep 17 00:00:00 2001 From: Petr Danecek Date: Fri, 15 Mar 2013 10:25:33 +0100 Subject: [PATCH] Get rid of %ld-with-int64_t warning on Mac --- sam_view.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sam_view.c b/sam_view.c index 5283098..7f3fdab 100644 --- a/sam_view.c +++ b/sam_view.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "sam_header.h" #include "sam.h" #include "faidx.h" @@ -273,9 +274,9 @@ int main_samview(int argc, char *argv[]) } view_end: - if (is_count && ret == 0) { - printf("%ld\n", count); // compilers on some platforms may complain about printing int64_t with %ld - } + if (is_count && ret == 0) + printf("%" PRId64 "\n", count); + // close files, free and return free(fn_list); free(fn_ref); free(fn_out); free(g_library); free(g_rg); free(fn_rg); if (g_bed) bed_destroy(g_bed); -- 2.39.2