From 51ade9f119ed9d742f438c02f47361f0c4cd0ef6 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Fri, 27 Mar 2026 19:21:11 -0500 Subject: [PATCH] All warnings fixed/silenced. --- .gitignore | 4 ---- apps/Makefile | 2 +- apps/cpanel/cpanel.c | 2 +- apps/imgview/imgview.c | 2 +- core/Makefile | 2 +- core/dvxApp.c | 6 +++--- core/dvxImage.c | 2 +- core/dvxImageWrite.c | 2 +- core/dvxPrefs.c | 2 +- core/dvxWm.c | 2 +- core/thirdparty/stb_ds_wrap.h | 17 +++++++++++++++++ core/thirdparty/stb_image_wrap.h | 17 +++++++++++++++++ core/thirdparty/stb_image_write_wrap.h | 17 +++++++++++++++++ core/widgetClass.c | 2 +- core/widgetCore.c | 2 +- dvxbasic/Makefile | 4 ++-- listhelp/Makefile | 2 +- loader/Makefile | 2 +- loader/loaderMain.c | 2 +- shell/Makefile | 2 +- shell/shellApp.c | 2 +- shell/shellMain.c | 2 +- taskmgr/Makefile | 2 +- taskmgr/shellTaskMgr.c | 2 +- tasks/Makefile | 2 +- tasks/taskswitch.c | 2 +- texthelp/Makefile | 2 +- widgets/Makefile | 2 +- widgets/widgetTimer.c | 2 +- 29 files changed, 79 insertions(+), 32 deletions(-) create mode 100644 core/thirdparty/stb_ds_wrap.h create mode 100644 core/thirdparty/stb_image_wrap.h create mode 100644 core/thirdparty/stb_image_write_wrap.h diff --git a/.gitignore b/.gitignore index 87cacdf..defbee0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,3 @@ lib/ .gitattributes~ *.SWP .claude/ -dvxbasic/test_compiler -dvxbasic/test_lex -dvxbasic/test_quick -dvxbasic/test_vm diff --git a/apps/Makefile b/apps/Makefile index 28185e2..b3d9e0e 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -4,7 +4,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp DJGPP_LIBPATH = $(HOME)/claude/windriver/tools/lib CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../core/thirdparty -I../widgets -I../tasks -I../core/thirdparty -I../shell +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I../core -I../core/platform -I../core/thirdparty -I../widgets -I../tasks -I../core/thirdparty -I../shell OBJDIR = ../obj/apps BINDIR = ../bin/apps diff --git a/apps/cpanel/cpanel.c b/apps/cpanel/cpanel.c index 7092d67..1dd1f4c 100644 --- a/apps/cpanel/cpanel.c +++ b/apps/cpanel/cpanel.c @@ -25,7 +25,7 @@ #include "dvxWm.h" #include "dvxPlatform.h" #include "shellApp.h" -#include "stb_ds.h" +#include "stb_ds_wrap.h" #include #include diff --git a/apps/imgview/imgview.c b/apps/imgview/imgview.c index ee83008..541c3cc 100644 --- a/apps/imgview/imgview.c +++ b/apps/imgview/imgview.c @@ -9,7 +9,7 @@ #include "dvxWidget.h" #include "dvxWm.h" #include "shellApp.h" -#include "stb_image.h" +#include "stb_image_wrap.h" #include #include diff --git a/core/Makefile b/core/Makefile index 521b1a7..76ce067 100644 --- a/core/Makefile +++ b/core/Makefile @@ -7,7 +7,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I. -Iplatform -I../tasks -Ithirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I. -Iplatform -I../tasks -Ithirdparty OBJDIR = ../obj/core LIBSDIR = ../bin/libs diff --git a/core/dvxApp.c b/core/dvxApp.c index 34f4c5d..50bc236 100644 --- a/core/dvxApp.c +++ b/core/dvxApp.c @@ -38,14 +38,14 @@ #include "dvxCursor.h" #include "dvxPlatform.h" -#include "thirdparty/stb_ds.h" +#include "thirdparty/stb_ds_wrap.h" #include #include #include -#include "thirdparty/stb_image.h" -#include "thirdparty/stb_image_write.h" +#include "thirdparty/stb_image_wrap.h" +#include "thirdparty/stb_image_write_wrap.h" // Double-click timing uses CLOCKS_PER_SEC so it's portable between DJGPP // (where CLOCKS_PER_SEC is typically 91, from the PIT) and Linux/SDL. diff --git a/core/dvxImage.c b/core/dvxImage.c index 9ae8a81..4419198 100644 --- a/core/dvxImage.c +++ b/core/dvxImage.c @@ -27,7 +27,7 @@ #define STBI_ONLY_GIF #define STBI_NO_SIMD #define STB_IMAGE_IMPLEMENTATION -#include "thirdparty/stb_image.h" +#include "thirdparty/stb_image_wrap.h" #pragma GCC diagnostic pop diff --git a/core/dvxImageWrite.c b/core/dvxImageWrite.c index cf6817d..c24d5ce 100644 --- a/core/dvxImageWrite.c +++ b/core/dvxImageWrite.c @@ -15,7 +15,7 @@ #define STBI_WRITE_NO_SIMD #define STB_IMAGE_WRITE_IMPLEMENTATION -#include "thirdparty/stb_image_write.h" +#include "thirdparty/stb_image_write_wrap.h" #pragma GCC diagnostic pop diff --git a/core/dvxPrefs.c b/core/dvxPrefs.c index 633f0a6..25c7ce4 100644 --- a/core/dvxPrefs.c +++ b/core/dvxPrefs.c @@ -13,7 +13,7 @@ #include "dvxMem.h" // stb_ds dynamic arrays (implementation lives in libtasks.a) -#include "thirdparty/stb_ds.h" +#include "thirdparty/stb_ds_wrap.h" // ============================================================ diff --git a/core/dvxWm.c b/core/dvxWm.c index 4324d35..c77d6f5 100644 --- a/core/dvxWm.c +++ b/core/dvxWm.c @@ -34,7 +34,7 @@ #include "dvxDraw.h" #include "dvxComp.h" #include "dvxWidget.h" -#include "thirdparty/stb_image.h" +#include "thirdparty/stb_image_wrap.h" #include #include diff --git a/core/thirdparty/stb_ds_wrap.h b/core/thirdparty/stb_ds_wrap.h new file mode 100644 index 0000000..e26b43b --- /dev/null +++ b/core/thirdparty/stb_ds_wrap.h @@ -0,0 +1,17 @@ +// stb_ds_wrap.h -- Wrapper for stb_ds.h that suppresses third-party warnings +#ifndef STB_DS_WRAP_H +#define STB_DS_WRAP_H + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#pragma GCC diagnostic ignored "-Wsign-compare" +#endif + +#include "stb_ds.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#endif // STB_DS_WRAP_H diff --git a/core/thirdparty/stb_image_wrap.h b/core/thirdparty/stb_image_wrap.h new file mode 100644 index 0000000..f1ad047 --- /dev/null +++ b/core/thirdparty/stb_image_wrap.h @@ -0,0 +1,17 @@ +// stb_image_wrap.h -- Wrapper for stb_image.h that suppresses third-party warnings +#ifndef STB_IMAGE_WRAP_H +#define STB_IMAGE_WRAP_H + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + +#include "stb_image.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#endif // STB_IMAGE_WRAP_H diff --git a/core/thirdparty/stb_image_write_wrap.h b/core/thirdparty/stb_image_write_wrap.h new file mode 100644 index 0000000..dd8e2eb --- /dev/null +++ b/core/thirdparty/stb_image_write_wrap.h @@ -0,0 +1,17 @@ +// stb_image_write_wrap.h -- Wrapper for stb_image_write.h that suppresses third-party warnings +#ifndef STB_IMAGE_WRITE_WRAP_H +#define STB_IMAGE_WRITE_WRAP_H + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + +#include "stb_image_write.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#endif // STB_IMAGE_WRITE_WRAP_H diff --git a/core/widgetClass.c b/core/widgetClass.c index 77701fd..18fe7f9 100644 --- a/core/widgetClass.c +++ b/core/widgetClass.c @@ -12,7 +12,7 @@ // the API pointer, then casts and calls through it. #include "dvxWidgetPlugin.h" -#include "stb_ds.h" +#include "stb_ds_wrap.h" #include #include diff --git a/core/widgetCore.c b/core/widgetCore.c index 38faffe..32405ea 100644 --- a/core/widgetCore.c +++ b/core/widgetCore.c @@ -19,7 +19,7 @@ // which doesn't map cleanly to an arena pattern. #include "dvxWidgetPlugin.h" -#include "stb_ds.h" +#include "stb_ds_wrap.h" #include diff --git a/dvxbasic/Makefile b/dvxbasic/Makefile index 0ff4072..9f9a8da 100644 --- a/dvxbasic/Makefile +++ b/dvxbasic/Makefile @@ -12,7 +12,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../shell -I../tasks -I../core/thirdparty -I. +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../shell -I../tasks -I../core/thirdparty -I. OBJDIR = ../obj/dvxbasic LIBSDIR = ../bin/libs @@ -36,7 +36,7 @@ APP_TARGET = $(APPDIR)/dvxbasic.app # Native test programs (host gcc, not cross-compiled) HOSTCC = gcc -HOSTCFLAGS = -O2 -Wall -Wextra -I. +HOSTCFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -I. BINDIR = ../bin TEST_COMPILER = $(BINDIR)/test_compiler diff --git a/listhelp/Makefile b/listhelp/Makefile index ba73ed8..ae24eea 100644 --- a/listhelp/Makefile +++ b/listhelp/Makefile @@ -6,7 +6,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I. -I../core -I../core/platform -I../tasks -I../core/thirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I. -I../core -I../core/platform -I../tasks -I../core/thirdparty OBJDIR = ../obj/listhelp LIBSDIR = ../bin/libs diff --git a/loader/Makefile b/loader/Makefile index b118c86..9cc88f9 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -9,7 +9,7 @@ DJGPP_LIBPATH = $(HOME)/claude/windriver/tools/lib CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc EXE2COFF = $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/exe2coff CWSDSTUB = $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/CWSDSTUB.EXE -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../tasks -I../core/thirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I../core -I../core/platform -I../tasks -I../core/thirdparty LDFLAGS = -lm OBJDIR = ../obj/loader diff --git a/loader/loaderMain.c b/loader/loaderMain.c index 6866898..19efeea 100644 --- a/loader/loaderMain.c +++ b/loader/loaderMain.c @@ -29,7 +29,7 @@ extern void dvxFree(void *ptr); #define STBDS_REALLOC(c, p, s) dvxRealloc((p), (s)) #define STBDS_FREE(c, p) dvxFree(p) #define STB_DS_IMPLEMENTATION -#include "stb_ds.h" +#include "stb_ds_wrap.h" // ============================================================ // Constants diff --git a/shell/Makefile b/shell/Makefile index 181aaec..eb994ca 100644 --- a/shell/Makefile +++ b/shell/Makefile @@ -5,7 +5,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../tasks -I../core/thirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../tasks -I../core/thirdparty OBJDIR = ../obj/shell LIBSDIR = ../bin/libs diff --git a/shell/shellApp.c b/shell/shellApp.c index 17868e8..fa12d7c 100644 --- a/shell/shellApp.c +++ b/shell/shellApp.c @@ -6,7 +6,7 @@ #include "shellApp.h" #include "dvxDialog.h" #include "dvxPlatform.h" -#include "stb_ds.h" +#include "stb_ds_wrap.h" #include #include diff --git a/shell/shellMain.c b/shell/shellMain.c index 6046770..fa29141 100644 --- a/shell/shellMain.c +++ b/shell/shellMain.c @@ -34,7 +34,7 @@ #include "dvxComp.h" #include "dvxPrefs.h" #include "dvxPlatform.h" -#include "stb_ds.h" +#include "stb_ds_wrap.h" #include #include diff --git a/taskmgr/Makefile b/taskmgr/Makefile index 2da93da..ce94bcc 100644 --- a/taskmgr/Makefile +++ b/taskmgr/Makefile @@ -5,7 +5,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../shell -I../tasks -I../core/thirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../shell -I../tasks -I../core/thirdparty OBJDIR = ../obj/taskmgr LIBSDIR = ../bin/libs diff --git a/taskmgr/shellTaskMgr.c b/taskmgr/shellTaskMgr.c index 49324a5..7088680 100644 --- a/taskmgr/shellTaskMgr.c +++ b/taskmgr/shellTaskMgr.c @@ -14,7 +14,7 @@ #include "widgetListView.h" #include "dvxWm.h" #include "dvxPlatform.h" -#include "stb_ds.h" +#include "stb_ds_wrap.h" #include #include diff --git a/tasks/Makefile b/tasks/Makefile index bbab00a..a1050a1 100644 --- a/tasks/Makefile +++ b/tasks/Makefile @@ -5,7 +5,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 OBJDIR = ../obj/tasks LIBSDIR = ../bin/libs diff --git a/tasks/taskswitch.c b/tasks/taskswitch.c index fd88f9f..2f231db 100644 --- a/tasks/taskswitch.c +++ b/tasks/taskswitch.c @@ -21,7 +21,7 @@ // scheduler's linear scan. The downside (holes after termination) is // mitigated by slot recycling in findFreeSlot(). -#include "../core/thirdparty/stb_ds.h" +#include "../core/thirdparty/stb_ds_wrap.h" #include "taskswitch.h" #include diff --git a/texthelp/Makefile b/texthelp/Makefile index a51c2fe..6377843 100644 --- a/texthelp/Makefile +++ b/texthelp/Makefile @@ -6,7 +6,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I. -I../core -I../core/platform -I../tasks -I../core/thirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I. -I../core -I../core/platform -I../tasks -I../core/thirdparty OBJDIR = ../obj/texthelp LIBSDIR = ../bin/libs diff --git a/widgets/Makefile b/widgets/Makefile index 44dc5e6..c2bdf6b 100644 --- a/widgets/Makefile +++ b/widgets/Makefile @@ -6,7 +6,7 @@ DJGPP_PREFIX = $(HOME)/djgpp/djgpp CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen -CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../tasks -I../core/thirdparty +CFLAGS = -O2 -Wall -Wextra -Wno-type-limits -Wno-sign-compare -march=i486 -mtune=i586 -I../core -I../core/platform -I../tasks -I../core/thirdparty OBJDIR = ../obj/widgets WGTDIR = ../bin/widgets diff --git a/widgets/widgetTimer.c b/widgets/widgetTimer.c index 7661a4a..ddc5038 100644 --- a/widgets/widgetTimer.c +++ b/widgets/widgetTimer.c @@ -15,7 +15,7 @@ static int32_t sTypeId = -1; #include -#include "stb_ds.h" +#include "stb_ds_wrap.h" typedef struct { int32_t intervalMs;