Merge lp:~sforshee/powerd/log-format-string-validation into lp:powerd

Proposed by Seth Forshee
Status: Merged
Approved by: Matt Fischer
Approved revision: 72
Merged at revision: 65
Proposed branch: lp:~sforshee/powerd/log-format-string-validation
Merge into: lp:powerd
Prerequisite: lp:~sforshee/powerd/fix-warnings
Diff against target: 13 lines (+2/-1)
1 file modified
src/log.h (+2/-1)
To merge this branch: bzr merge lp:~sforshee/powerd/log-format-string-validation
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Matt Fischer (community) Approve
Review via email: mp+174062@code.launchpad.net

Commit message

Type check powerd_log() arguments against the format string

Description of the change

Type check powerd_log() arguments against the format string

To post a comment you must log in.
Revision history for this message
Matt Fischer (mfisch) wrote :

Good fix.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/log.h'
2--- src/log.h 2013-06-10 19:41:44 +0000
3+++ src/log.h 2013-07-10 21:34:45 +0000
4@@ -35,7 +35,8 @@
5 #define powerd_info(f, a...) powerd_log(POWERD_LOG_INFO, f, ##a)
6 #define powerd_debug(f, a...) powerd_log(POWERD_LOG_DEBUG, f, ##a)
7
8-void powerd_log(int level, const char *fmt, ...);
9+void powerd_log(int level, const char *fmt, ...)
10+ __attribute__ ((format (printf, 2, 3)));
11 void powerd_log_init(void);
12
13 #ifdef __cplusplus

Subscribers

People subscribed via source and target branches