File 0004-Fix-build-errors-caused-by-Werror-format-security.patch of Package alsa-tools

From e79e2011efcfb15aa80bf40f5c98b30a5a282dde Mon Sep 17 00:00:00 2001
From: Jordi Mallach <jordi@debian.org>
Date: Wed, 15 May 2013 19:19:09 +0200
Subject: [PATCH 4/5] Fix build errors caused by -Werror=format-security.

When compiled with hardening-flags enabled, ld10k1 fails to build due to
a pair of unsafe printf usages that trigger -Werror=format-security.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 ld10k1/src/ld10k1.c | 2 +-
 ld10k1/src/lo10k1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ld10k1/src/ld10k1.c b/ld10k1/src/ld10k1.c
index 7359f13..e31c5af 100644
--- a/ld10k1/src/ld10k1.c
+++ b/ld10k1/src/ld10k1.c
@@ -62,7 +62,7 @@ static void vlog(const char *label, const char *fmt, va_list va)
 			 localtime(&tp));
 		fprintf(out, "%s %s", timestr, label);
 	} else 
-		fprintf(out, label);
+		fprintf(out, "%s", label);
 	vfprintf(out, fmt, va);
 	fprintf(out, "\n");
 	fflush(out);
diff --git a/ld10k1/src/lo10k1.c b/ld10k1/src/lo10k1.c
index 3d04405..962c3ef 100644
--- a/ld10k1/src/lo10k1.c
+++ b/ld10k1/src/lo10k1.c
@@ -868,7 +868,7 @@ err:
 
 void debug_print(char *str)
 {
-	printf(str);
+	printf("%s", str);
 }
 
 static int debug(int deb)
-- 
1.8.2.3
openSUSE Build Service is sponsored by