From 7b2c770ef7385276bf4884ffe308a6c79a8046ef Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 13 Apr 2023 20:14:36 +0200 Subject: Fix trailing comma in enums of public headers Compiler warning: comma at end of enumerator list [-Wpedantic] Note 1: I decided to fix these warnings although trailing commas in enums are allowed at least since C++11. Note 2: I fixed only public headers because these headers may be compiled in user code. To do: check internal headers. --- FL/fl_casts.H | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'FL/fl_casts.H') diff --git a/FL/fl_casts.H b/FL/fl_casts.H index 1d0d881cd..cb9a708db 100644 --- a/FL/fl_casts.H +++ b/FL/fl_casts.H @@ -15,6 +15,9 @@ // https://www.fltk.org/bugs.php // +#ifndef _FL_fl_casts_H_ +#define _FL_fl_casts_H_ + #include inline char fl_char(void *v) { return (char)(fl_intptr_t)v; } @@ -32,3 +35,5 @@ inline void *fl_voidptr(int v) { return (void *)(fl_intptr_t)v; } inline void *fl_voidptr(unsigned int v) { return (void *)(fl_uintptr_t)v; } inline void *fl_voidptr(long v) { return (void *)(fl_intptr_t)v; } inline void *fl_voidptr(unsigned long v) { return (void *)(fl_uintptr_t)v; } + +#endif /* _FL_fl_casts_H_ */ -- cgit v1.2.3