From 6ba31e25d75ed55a749618e0565f42029a8006a8 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Thu, 6 Jun 2019 06:44:07 +0900 Subject: [PATCH] bin/screenmode: Fix -Wformat= Change-Id: Ide67c285a064c8e1111e1522be2946f69a5bcfc6 Reviewed-on: https://review.haiku-os.org/c/1512 Reviewed-by: waddlesplash --- src/bin/screenmode/screenmode.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bin/screenmode/screenmode.cpp b/src/bin/screenmode/screenmode.cpp index d8b79295e0..f31248fae8 100644 --- a/src/bin/screenmode/screenmode.cpp +++ b/src/bin/screenmode/screenmode.cpp @@ -66,7 +66,7 @@ print_mode(const display_mode& displayMode, const screen_mode& mode) { const display_timing& timing = displayMode.timing; - printf("%lu %u %u %u %u %u %u %u %u ", timing.pixel_clock / 1000, + printf("%" B_PRIu32 " %u %u %u %u %u %u %u %u ", timing.pixel_clock / 1000, timing.h_display, timing.h_sync_start, timing.h_sync_end, timing.h_total, timing.v_display, timing.v_sync_start, timing.v_sync_end, timing.v_total); @@ -78,7 +78,7 @@ print_mode(const display_mode& displayMode, const screen_mode& mode) printf(" +VSync"); if ((timing.flags & B_TIMING_INTERLACED) != 0) printf(" Interlace"); - printf(" %lu\n", mode.BitsPerPixel()); + printf(" %" B_PRId32 "\n", mode.BitsPerPixel()); } @@ -355,9 +355,13 @@ main(int argc, char** argv) screenMode.Revert(); } } else { - fprintf(stderr, "%s: Could not set screen mode %ldx%ldx%ld: %s\n", - kProgramName, newMode.width, newMode.height, newMode.BitsPerPixel(), - strerror(status)); + fprintf(stderr, + "%s: Could not set screen mode " + "%" B_PRId32 "x%" B_PRId32 "x%" B_PRId32 ": " + "%s\n", + kProgramName, + newMode.width, newMode.height, newMode.BitsPerPixel(), + strerror(status)); return 1; }