From 32d5023a421102591c096b304c5c4ba158f67afc Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 14 Feb 2006 19:13:10 +0000 Subject: printf() format check & constness fixups. CVS patchset: 7901 CVS date: 2006/02/14 19:13:10 --- src/xine-utils/xine_check.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index 994646e85..2479a9887 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -72,7 +72,9 @@ #endif /* !__linux__ */ -static void set_hc_result(xine_health_check_t* hc, int state, char *format, ...) { +static void __attribute__ ((format (printf, 3, 4))) +set_hc_result(xine_health_check_t* hc, int state, const char *format, ...) +{ va_list args; char *buf = NULL; @@ -173,13 +175,12 @@ xine_health_check_t* _x_health_check_kernel (xine_health_check_t* hc) { #if defined(ARCH_X86) || defined(ARCH_X86_64) xine_health_check_t* _x_health_check_mtrr (xine_health_check_t* hc) { - char *file = "/proc/mtrr"; FILE *fd; hc->title = "Check for MTRR support"; hc->explanation = "Make sure your kernel has MTRR support compiled in."; - fd = fopen(file, "r"); + fd = fopen("/proc/mtrr", "r"); if (!fd) { set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED: mtrr is not enabled."); -- cgit v1.2.3