File: string_format_specifier.diff

package info (click to toggle)
gtkgl2 2.1.0-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 448 kB
  • sloc: ansic: 3,004; makefile: 67; sh: 5
file content (25 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: compile with -Wformat hardening flags
Origin: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gtkgl2/saucy/revision/9?start_revid=9&remember=9

--- a/examples/shaders.c
+++ b/examples/shaders.c
@@ -147,7 +147,7 @@
      glGetShaderiv(shader_id, GL_INFO_LOG_LENGTH, &infologLength);
      infoLog = malloc(sizeof(GLchar) * infologLength);
      glGetShaderInfoLog(shader_id, infologLength, &charsWritten, infoLog);
-     g_print(infoLog);
+     g_print("%s", infoLog);
      free(infoLog);
    }
 }
--- a/examples/simple.c
+++ b/examples/simple.c
@@ -161,7 +161,7 @@
 
   /* vendor dependent version info string */
   info_str = gdk_gl_get_info();
-  g_print(info_str);
+  g_print("%s", info_str);
   g_free(info_str);
 
   gtk_main();