From 1db493092ca6a68ff690251cc428037b54019a73 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 8 Apr 2026 18:26:03 +0200 Subject: added CHECK_EOF to work around warnings about EOF and -1 being the same (#2254) Co-authored-by: Andreas Baumann --- plugins/common.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/common.h') diff --git a/plugins/common.h b/plugins/common.h index b3053486..9d1434a3 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -205,4 +205,11 @@ enum { # define __attribute__(x) /* do nothing */ #endif +/* for checking the result of getopt_long */ +#if EOF == -1 +#define CHECK_EOF(c) ((c) == EOF) +#else +#define CHECK_EOF(c) ((c) == -1 || (c) == EOF) +#endif + #endif /* _COMMON_H_ */ -- cgit v1.2.3-74-g34f1