mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 03:47:16 +02:00
85 lines
2.8 KiB
Diff
85 lines
2.8 KiB
Diff
From 7d21d7f469d90c2d55b23926c866bba635aa7e6f Mon Sep 17 00:00:00 2001
|
|
From: Mike Frysinger <vapier@gentoo.org>
|
|
Date: Sun, 14 Feb 2016 18:05:49 -0500
|
|
Subject: [PATCH] report/oops: constify format strings
|
|
|
|
---
|
|
src/headers/gpm.h | 4 ++--
|
|
src/headers/message.h | 2 +-
|
|
src/lib/report-lib.c | 4 ++--
|
|
src/prog/mouse-test.c | 2 +-
|
|
src/report.c | 2 +-
|
|
5 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/headers/gpm.h b/src/headers/gpm.h
|
|
index 57dc618..9e96deb 100644
|
|
--- a/src/headers/gpm.h
|
|
+++ b/src/headers/gpm.h
|
|
@@ -280,10 +280,10 @@ 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, ... );
|
|
+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, ... );
|
|
+void gpm_report(int line, const char *file, int stat, const char *text, ... );
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
diff --git a/src/headers/message.h b/src/headers/message.h
|
|
index a0fed0e..25cad8c 100644
|
|
--- a/src/headers/message.h
|
|
+++ b/src/headers/message.h
|
|
@@ -226,7 +226,7 @@
|
|
/* #define GPM_MESS_ "" */
|
|
|
|
/* functions */
|
|
-void gpm_report(int line, char *file, int stat, char *text, ... );
|
|
+void gpm_report(int line, const char *file, int stat, const char *text, ... );
|
|
|
|
/* rest of wd.h */
|
|
#ifdef HAVE_SYSLOG_H
|
|
diff --git a/src/lib/report-lib.c b/src/lib/report-lib.c
|
|
index c0ae086..b565b77 100644
|
|
--- a/src/lib/report-lib.c
|
|
+++ b/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;
|
|
|
|
diff --git a/src/prog/mouse-test.c b/src/prog/mouse-test.c
|
|
index 0bb1982..ab8d602 100644
|
|
--- a/src/prog/mouse-test.c
|
|
+++ b/src/prog/mouse-test.c
|
|
@@ -182,7 +182,7 @@ Gpm_Type *(*I_serial)(int fd, unsigned short flags, struct Gpm_Type *type,
|
|
/*-----------------------------------------------------------------------------
|
|
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 */
|
|
diff --git a/src/report.c b/src/report.c
|
|
index 6c7c2ee..286c1b7 100644
|
|
--- a/src/report.c
|
|
+++ b/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;
|