]> granicus.if.org Git - strace/commitdiff
* bjm.c (sys_query_module): Fix format warning reported by
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 1 Jun 2009 10:32:27 +0000 (10:32 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 1 Jun 2009 10:32:27 +0000 (10:32 +0000)
gcc -Wformat-security.
* file.c (tprint_open_modes): Likewise.
* process.c (printargv): Likewise.
* signal.c (printsignal): Likewise.

ChangeLog
bjm.c
file.c
process.c
signal.c

index 13cf0ce5f54e4b3e40f9c7989e7eba1b9a9fb542..e0b1090464ba39db8085a6803038f79e496167c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-06-01  Dmitry V. Levin  <ldv@altlinux.org>
 
+       * bjm.c (sys_query_module): Fix format warning reported by
+       gcc -Wformat-security.
+       * file.c (tprint_open_modes): Likewise.
+       * process.c (printargv): Likewise.
+       * signal.c (printsignal): Likewise.
+
+       Clean up header checks.
        * configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and
        easily updated, and reduce merging errors in the future.
        * system.c: Convert all non-standard #ifdef checks for specific
diff --git a/bjm.c b/bjm.c
index 5947a4192d7b66d990df83dfed8078c7663f5775..f56e48f43de447d3bcf17d616d9ee1708c05b8bd 100644 (file)
--- a/bjm.c
+++ b/bjm.c
@@ -142,7 +142,7 @@ struct tcb *tcp;
                                        for (idx=0; idx<ret; idx++) {
                                                if (idx!=0)
                                                        tprintf(",");
-                                               tprintf(mod);
+                                               tprintf("%s", mod);
                                                mod+=strlen(mod)+1;
                                        }
                                        free(data);
diff --git a/file.c b/file.c
index 53c2489515047e2429b41f2bb1f0a31f0b902a90..8023e70d26ae050cacbc42f61ac543f7fe5887d7 100644 (file)
--- a/file.c
+++ b/file.c
@@ -395,7 +395,7 @@ sprint_open_modes(mode_t flags)
 void
 tprint_open_modes(mode_t flags)
 {
-       tprintf(sprint_open_modes(flags) + sizeof("flags"));
+       tprintf("%s", sprint_open_modes(flags) + sizeof("flags"));
 }
 
 static int
index 1ddf2f3218295c0e7a4c9adb740f554a92f61566..5119ede5b047b5b38b36778a343937bf6ac1aa8c 100644 (file)
--- a/process.c
+++ b/process.c
@@ -1785,7 +1785,7 @@ long addr;
                        cp.p64 = cp.p32;
                if (cp.p64 == 0)
                        break;
-               tprintf(sep);
+               tprintf("%s", sep);
                printstr(tcp, cp.p64, -1);
                addr += personality_wordsize[current_personality];
        }
index 403fe3b51b40d2107a458dca6d724eb0afacdac1..3203657602d09e49a1457f0efe631be4fca076af 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -402,7 +402,7 @@ void
 printsignal(nr)
 int nr;
 {
-       tprintf(signame(nr));
+       tprintf("%s", signame(nr));
 }
 
 void