Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 463366 Details for
Bug 539320
sys-libs/gpm fails to compile with format-security
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gpm-1.20.7-misc-warning-cleanups.patch
gpm-1.20.7-misc-warning-cleanups-r1.patch (text/plain), 4.00 KB, created by
René Rhéaume
on 2017-02-11 22:00:13 UTC
(
hide
)
Description:
gpm-1.20.7-misc-warning-cleanups.patch
Filename:
MIME Type:
Creator:
René Rhéaume
Created:
2017-02-11 22:00:13 UTC
Size:
4.00 KB
patch
obsolete
>--- gpm-1.20.7/.gitignore >+++ gpm-1.20.7-format-security/.gitignore >@@ -11,6 +11,7 @@ Makefile > Makefile.include > /aclocal.m4 > /autom4te.cache >+/config.cache > /config.log > /config.status > /configure >@@ -29,7 +30,7 @@ Makefile.include > /src/gpm > /src/gpm2/tmp > /src/gpm2/out >-/src/lib/libgpm.so.* >+/src/lib/libgpm.so* > /src/prog/disable-paste > /src/prog/display-buttons > /src/prog/display-coords >--- gpm-1.20.7/src/headers/gpm.h >+++ gpm-1.20.7-format-security/src/headers/gpm.h >@@ -280,10 +280,16 @@ int Gpm_GetSnapshot(Gpm_Event *ePtr); > char *Gpm_get_console( void ); > int Gpm_x_high_y(int base, int pot_y); > int Gpm_cnt_digits(int number); >-void gpm_oops(int line, char *file, char *text, ... ); >+#ifdef __GNUC__ >+__attribute__((__format__(printf, 3, 4))) >+#endif >+void gpm_oops(int line, const char *file, const char *text, ... ); > > /* report.c / report-lib.c */ >-void gpm_report(int line, char *file, int stat, char *text, ... ); >+#ifdef __GNUC__ >+__attribute__((__format__(printf, 4, 5))) >+#endif >+void gpm_report(int line, const char *file, int stat, const char *text, ... ); > > #ifdef __cplusplus > }; >--- gpm-1.20.7/src/headers/message.h >+++ gpm-1.20.7-format-security/src/headers/message.h >@@ -226,7 +226,10 @@ > /* #define GPM_MESS_ "" */ > > /* functions */ >-void gpm_report(int line, char *file, int stat, char *text, ... ); >+#ifdef __GNUC__ >+__attribute__((__format__(printf, 4, 5))) >+#endif >+void gpm_report(int line, const char *file, int stat, const char *text, ... ); > > /* rest of wd.h */ > #ifdef HAVE_SYSLOG_H >--- gpm-1.20.7/src/lib/report-lib.c >+++ gpm-1.20.7-format-security/src/lib/report-lib.c >@@ -24,9 +24,9 @@ > > #include "headers/message.h" > >-void gpm_report(int line, char *file, int stat, char *text, ... ) >+void gpm_report(int line, const char *file, int stat, const char *text, ... ) > { >- char *string = NULL; >+ const char *string = NULL; > int log_level; > va_list ap; > >@@ -47,7 +47,7 @@ void gpm_report(int line, char *file, in > log_level = LOG_CRIT; break; > } > #ifdef HAVE_VSYSLOG >- syslog(log_level, string); >+ syslog(log_level, "%s", string); > vsyslog(log_level, text, ap); > #else > fprintf(stderr,"%s[%s(%d)]:\n",string,file,line); >--- gpm-1.20.7/src/prog/gpm-root.y >+++ gpm-1.20.7-format-security/src/prog/gpm-root.y >@@ -443,6 +443,7 @@ void f__fix(struct passwd *pass) > } > > /*---------------------------------------------------------------------*/ >+#if 0 > static int f_debug_one(FILE *f, Draw *draw) > { > DrawItem *ip; >@@ -465,6 +466,7 @@ static int f_debug_one(FILE *f, Draw *dr > #undef LINE > return 0; > } >+#endif > > int f_debug(int mode, DrawItem *self, int uid) > { >@@ -960,10 +962,8 @@ static inline void scr_dump(int fd, FILE > /*------------*/ > static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc) > { >- int x,y, dumpfd; >+ int dumpfd; > char dumpname[20]; >- >- x=buffer[2]; y=buffer[3]; > > /* WILL NOT WORK WITH DEVFS! FIXME! */ > sprintf(dumpname,"/dev/vcsa%i",vc); >--- gpm-1.20.7/src/prog/mouse-test.c >+++ gpm-1.20.7-format-security/src/prog/mouse-test.c >@@ -182,14 +182,14 @@ Gpm_Type *(*I_serial)(int fd, unsigned s > /*----------------------------------------------------------------------------- > Place the description here. > -----------------------------------------------------------------------------*/ >-int mousereopen(int oldfd, char *name, Gpm_Type *type) >+int mousereopen(int oldfd, const char *name, Gpm_Type *type) > { > int fd; > if (!type) type=mice+1; /* ms */ > close(oldfd); > usleep(100000); > fd=open(name,O_RDWR); >- if (fd < 0) gpm_report(GPM_PR_OOPS,name); >+ if (fd < 0) gpm_report(GPM_PR_OOPS, "%s", name); > (*I_serial)(fd,type->flags,type,1,&type->name); /* ms initialization */ > return fd; > } >--- gpm-1.20.7/src/report.c >+++ gpm-1.20.7-format-security/src/report.c >@@ -69,7 +69,7 @@ > * > */ > >-void gpm_report(int line, char *file, int stat, char *text, ... ) >+void gpm_report(int line, const char *file, int stat, const char *text, ...) > { > FILE *console = NULL; > va_list ap, ap3;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 539320
:
395870
| 463366