mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Guard a few more format strings with __attribute__((format))
This will cause compile-time error messages to be raised if someone passes incorrect parameters to these strings.
This commit is contained in:
parent
b3d7d8b1da
commit
15375ba1e3
2 changed files with 4 additions and 4 deletions
|
@ -66,11 +66,11 @@ public:
|
|||
|
||||
// Report a runtime error in evaluating a Bro script expression. This
|
||||
// function will not return but raise an InterpreterException.
|
||||
void ExprRuntimeError(const Expr* expr, const char* fmt, ...);
|
||||
void ExprRuntimeError(const Expr* expr, const char* fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
|
||||
// Report a runtime error in evaluating a Bro script expression. This
|
||||
// function will not return but raise an InterpreterException.
|
||||
void RuntimeError(const Location* location, const char* fmt, ...);
|
||||
void RuntimeError(const Location* location, const char* fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
|
||||
// Report a traffic weirdness, i.e., an unexpected protocol situation
|
||||
// that may lead to incorrectly processing a connnection.
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
private:
|
||||
void DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
|
||||
Connection* conn, val_list* addl, bool location, bool time,
|
||||
const char* postfix, const char* fmt, va_list ap);
|
||||
const char* postfix, const char* fmt, va_list ap) __attribute__((format(printf, 10, 0)));
|
||||
|
||||
// The order if addl, name needs to be like that since fmt_name can
|
||||
// contain format specifiers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue