mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Mark die function as never returning
Improves static analysis output and reduces false positives.
This commit is contained in:
committed by
Simon Kelley
parent
c346f61535
commit
282eab7952
@@ -42,6 +42,12 @@
|
|||||||
# define __EXTENSIONS__
|
# define __EXTENSIONS__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__clang__)
|
||||||
|
#define ATTRIBUTE_NORETURN __attribute__ ((noreturn))
|
||||||
|
#else
|
||||||
|
#define ATTRIBUTE_NORETURN
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get these before config.h for IPv6 stuff... */
|
/* get these before config.h for IPv6 stuff... */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@@ -1275,7 +1281,7 @@ int wildcard_match(const char* wildcard, const char* match);
|
|||||||
int wildcard_matchn(const char* wildcard, const char* match, int num);
|
int wildcard_matchn(const char* wildcard, const char* match, int num);
|
||||||
|
|
||||||
/* log.c */
|
/* log.c */
|
||||||
void die(char *message, char *arg1, int exit_code);
|
void die(char *message, char *arg1, int exit_code) ATTRIBUTE_NORETURN;
|
||||||
int log_start(struct passwd *ent_pw, int errfd);
|
int log_start(struct passwd *ent_pw, int errfd);
|
||||||
int log_reopen(char *log_file);
|
int log_reopen(char *log_file);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user