X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sam_view.c;h=7f3fdabc1ca581476246e64cca85fedc8b45207e;hb=7c3295ba455fdc9269156dd1246c92ea5df3efd4;hp=528309897bbf7c2a35bb4f2fa4727f522afb889e;hpb=a71383ee344af03b1d8084a7ed8752a12f68e8e7;p=samtools.git 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);