Group :: Sistema/Bibliotecas
RPM: libggi
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: libggi_wformat.patch
Download
Download
---
display/linvtsw/visual.c | 4 2 + 2 - 0 !
ggi/mode.c | 2 1 + 1 - 0 !
programs/check/findleaks.c | 11 8 + 3 - 0 !
3 files changed, 11 insertions(+), 6 deletions(-)
Index: libggi-2.2.2/display/linvtsw/visual.c
===================================================================
--- libggi-2.2.2.orig/display/linvtsw/visual.c 2009-06-17 10:14:44.000000000 -0400
+++ libggi-2.2.2/display/linvtsw/visual.c 2009-06-17 10:15:07.000000000 -0400
@@ -316,7 +316,7 @@ vtswitch_open(ggi_visual *vis)
close(fd);
fd = open("/dev/console", O_WRONLY);
if (fd < 0) {
- fprintf(stderr, nopermstring);
+ fprintf(stderr, "%s", nopermstring);
return GGI_ENODEVICE;
}
if ((vthandling.vtnum = get_newcons(fd)) < 0) {
@@ -394,7 +394,7 @@ vtswitch_open(ggi_visual *vis)
origvtnum = vt_state.v_active;
if (vthandling.vtnum != vt_state.v_active) {
if (ioctl(vtfd, VT_ACTIVATE, vthandling.vtnum)) {
- fprintf(stderr, nopermstring);
+ fprintf(stderr, "%s", nopermstring);
close(vtfd);
vtfd = -1;
return GGI_ENODEVICE;
Index: libggi-2.2.2/ggi/mode.c
===================================================================
--- libggi-2.2.2.orig/ggi/mode.c 2005-08-15 14:50:58.000000000 -0400
+++ libggi-2.2.2/ggi/mode.c 2009-06-17 10:29:20.000000000 -0400
@@ -389,7 +389,7 @@ int ggiFPrintMode(FILE *s, const ggi_mod
ggiSPrintMode(buf, m);
- return fprintf(s, buf);
+ return fprintf(s, "%s", buf);
}
Index: libggi-2.2.2/programs/check/findleaks.c
===================================================================
--- libggi-2.2.2.orig/programs/check/findleaks.c 2005-06-09 14:46:12.000000000 -0400
+++ libggi-2.2.2/programs/check/findleaks.c 2009-06-17 10:51:40.000000000 -0400
@@ -18,6 +18,7 @@
#include "config.h"
#include <ggi/ggi.h>
#include <stdio.h>
+#include <stdarg.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -37,8 +38,12 @@ static void wait4key(void)
static void err(const char *s,...)
{
+ va_list ap;
+
printf("Fatal error: ");
- printf(s);
+ va_start(ap, s);
+ vprintf(s, ap);
+ va_end(ap);
exit(1);
}
@@ -72,7 +77,7 @@ static long get_size(void)
static void
inform_mem(const char *info, long prev, long now, long allocprev, long allocnow)
{
- printf(info);
+ printf("%s", info);
printf("Used before : %6ld, after: %6ld, Change: %6ld\n",
prev, now, now-prev);
printf("Alloced before: %6ld, after: %6ld, Change: %6ld\n",
@@ -96,7 +101,7 @@ static long get_size(void)
static void inform_mem(const char *info, long prev, long now, long allocprev, long allocnow)
{
- printf(info);
+ printf("%s", info);
fprintf(stderr, "inform_mem(): not implemented for your platform\n");
printf("Check memory stats now, then press any key\n");
fflush(stdout);