Projects
home:pandora:RobinOS23
gpm
_service:download_src_package:0017-report-oops-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:0017-report-oops-add-attributes-to-mark-as-printf-functio.patch of Package gpm
From 01265c7ac5f86a02a7cec323f34a3b54e5973872 Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vapier@gentoo.org> Date: Sun, 14 Feb 2016 21:02:48 -0500 Subject: [PATCH 17/28] report/oops: add attributes to mark as printf functions This allows gcc to do printf checking on calls to these funcs to make sure they're being called correctly. --- src/headers/gpm.h | 6 ++++++ src/headers/message.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/headers/gpm.h b/src/headers/gpm.h index 9e96deb..fe52e53 100644 --- a/src/headers/gpm.h +++ b/src/headers/gpm.h @@ -280,9 +280,15 @@ 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); +#ifdef __GNUC__ +__attribute__((__format__(printf, 3, 4))) +#endif void gpm_oops(int line, const char *file, const char *text, ... ); /* report.c / report-lib.c */ +#ifdef __GNUC__ +__attribute__((__format__(printf, 4, 5))) +#endif 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 25cad8c..4b60291 100644 --- a/src/headers/message.h +++ b/src/headers/message.h @@ -226,6 +226,9 @@ /* #define GPM_MESS_ "" */ /* functions */ +#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 */ -- 2.19.1.6.gb485710b
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2