Demos (master): es1_info: convert indentString into a literal string
Brian Paul
brianp at kemper.freedesktop.org
Wed Jan 12 14:39:33 UTC 2011
Module: Demos
Branch: master
Commit: 4238e09432548033d40fc24508d5af130aaa4634
URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=4238e09432548033d40fc24508d5af130aaa4634
Author: Paulo Zanoni <pzanoni at mandriva.com>
Date: Thu Jan 6 08:09:26 2011 -0800
es1_info: convert indentString into a literal string
This fixes compilation with "-Wformat -Werror=format-security". Some
distros like Mandriva enable this flag by default. Its purpose is to
improve security.
Another option for this patch would be to do
"printf("%s", indentString)", but converting indentString into a literal
also gives the compiler some hints to improve performance.
Signed-off-by: Paulo Zanoni <pzanoni at mandriva.com>
Signed-off-by: Brian Paul <brianp at vmware.com>
---
src/egl/opengles1/es1_info.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/egl/opengles1/es1_info.c b/src/egl/opengles1/es1_info.c
index 93816b5..38becc5 100644
--- a/src/egl/opengles1/es1_info.c
+++ b/src/egl/opengles1/es1_info.c
@@ -29,7 +29,7 @@
static void
print_extension_list(const char *ext)
{
- const char *indentString = " ";
+ const char indentString[] = " ";
const int indent = 4;
const int max = 79;
int width, i, j;
More information about the mesa-commit
mailing list