XCircuit
XCircuit copied to clipboard
C99+ compatibility
After grace period of 25 years, Clang-16 and GCC-14 are enabling errors code that was made illegal in C99 standard. Note that it's very easy to accidentally mess this up by forgetting to specify a return type, and the result is Undefined Behavior and extremely prone to crashing or worse, so it's important for compilers to be able to catch this and prevent user error.
Here is except of build failure
Cascade.c:283:8: error: type specifier missing, defaults to 'int'; ISO C99 and
later do not support implicit int [-Werror,-Wimplicit-int]
static GetIdealSize(mw, replyWidth, replyHeight)
~~~~~~ ^
int
You can verify/reproduce the build failure on older versions of GCC using the following flags: -Werror=implicit-int
see also: https://bugs.gentoo.org/870553
There are quite a few errors, in fact.
Making all in Xw
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o MapEvents.o MapEvents.c
MapEvents.c:117:8: error: type defaults to ‘int’ in declaration of ‘initialized’ [-Werror=implicit-int]
117 | static initialized = FALSE;
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: MapEvents.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o Display.o Display.c
Display.c:198:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
198 | static AsciiInsertCursor (w, x, y, state)
| ^~~~~~~~~~~~~~~~~
Display.c:232:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
232 | static AsciiClearToBackground (w, x, y, width, height)
| ^~~~~~~~~~~~~~~~~~~~~~
Display.c:248:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
248 | static AsciiFindDistance (w, fromPos, fromx, toPos,
| ^~~~~~~~~~~~~~~~~
Display.c:396:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
396 | static AsciiFindPosition(w, fromPos, fromx, width, stopAtWordBreak,
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: Display.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o Cascade.o Cascade.c
Cascade.c:283:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
283 | static GetIdealSize(mw, replyWidth, replyHeight)
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: Cascade.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o ResConvert.o ResConvert.c
ResConvert.c:129:1: error: return type defaults to ‘int’ [-Werror=implicit-int]
129 | XwRegisterConverters ()
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: ResConvert.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o Primitive.o Primitive.c
Primitive.c: In function ‘ClassInitialize’:
Primitive.c:238:4: error: implicit declaration of function ‘XwRegisterConverters’; did you mean ‘XtRegisterCaseConverter’? [-Werror=implicit-function-declaration]
238 | XwRegisterConverters();
| ^~~~~~~~~~~~~~~~~~~~
| XtRegisterCaseConverter
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: Primitive.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o Manager.o Manager.c
Manager.c: In function ‘ClassInitialize’:
Manager.c:205:5: error: implicit declaration of function ‘XwRegisterConverters’; did you mean ‘XtRegisterCaseConverter’? [-Werror=implicit-function-declaration]
205 | XwRegisterConverters(); /* Register Library Conversion Rtnes */
| ^~~~~~~~~~~~~~~~~~~~
| XtRegisterCaseConverter
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: Manager.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o Form.o Form.c
Form.c: In function ‘XwGetFormRef’:
Form.c:1027:1: error: type of ‘loc’ defaults to ‘int’ [-Werror=implicit-int]
1027 | XwGetFormRef (this, ref, offset, add, vary,
| ^~~~~~~~~~~~
Form.c:1027:1: error: type of ‘size’ defaults to ‘int’ [-Werror=implicit-int]
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: Form.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o PopupMgr.o PopupMgr.c
PopupMgr.c: In function ‘Post’:
PopupMgr.c:2517:7: error: implicit declaration of function ‘_XtPopup’; did you mean ‘XtPopup’? [-Werror=implicit-function-declaration]
2517 | _XtPopup (XtParent (menupane), grabtype, FALSE);
| ^~~~~~~~
| XtPopup
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: PopupMgr.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -I. -I.. -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o SourceStr.o SourceStr.c
SourceStr.c:175:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
175 | static StringSetLastPos (src, lastPos)
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:418: SourceStr.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30/Xw'
make[2]: Target 'all-am' not remade because of errors.
make[1]: *** [Makefile:430: all-recursive] Error 1
make[1]: Target 'all' not remade because of errors.
make[1]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -DPROG_VERSION=\"3.10\" -DPROG_REVISION=\"30\" -DCAD_DIR=\"/usr/lib64\" -DTEMP_DIR=\"/tmp\" -DRESOURCES_DIR=\"/usr/lib64/xcircuit-3.10/app-defaults\" -DSCRIPTS_DIR=\"/usr/lib64/xcircuit-3.10\" -DBUILTINS_DIR=\"/usr/lib64/xcircuit-3.10\" -DBUILTINS_FILE=\"\" -DUSER_RC_FILE=\".xcircuitrc\" -DPROLOGUE_DIR=\"/usr/lib64/xcircuit-3.10\" -DPROLOGUE_FILE=\"xcircps2.pro\" -DCYRILLIC_ENC_FILE=\"cyrillic.enc\" -DISOLATIN2_ENC_FILE=\"isolatin2.enc\" -DISOLATIN5_ENC_FILE=\"isolatin5.enc\" -DSTARTUP_FILE=\"startup.script\" -DLGF_LIB=\"lgf.lps\" -DASG_SPICE_LIB=\"asg_spice.lps\" -I. -IXw -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/freetype2 -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o functions.o functions.c
functions.c: In function ‘UDrawX’:
functions.c:2010:4: error: implicit declaration of function ‘UDrawXAt’; did you mean ‘UDrawX’? [-Werror=implicit-function-declaration]
2010 | UDrawXAt(&wpt);
| ^~~~~~~~
| UDrawX
functions.c: In function ‘UDoLatex’:
functions.c:2950:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat=]
2950 | fprintf(f, "\\rotatebox{-%d}{", thislabel->rotation);
| ~^ ~~~~~~~~~~~~~~~~~~~
| | |
| int double
| %f
functions.c: In function ‘TopDoLatex’:
functions.c:3002:25: warning: ‘.tex’ directive writing 4 bytes into a region of size between 1 and 100 [-Wformat-overflow=]
3002 | sprintf(filename, "%s.tex", filename);
| ^~~~
functions.c:3002:4: note: ‘sprintf’ output between 5 and 104 bytes into a destination of size 100
3002 | sprintf(filename, "%s.tex", filename);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [Makefile:551: functions.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30'
make[1]: Entering directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30'
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"xcircuit\" -DVERSION=\"3.10\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DHAVE_LIBXT=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBZ=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_U_CHAR=1 -DHAVE_X11_XPM_H=1 -DHAVE_XPM=1 -DHAVE_CAIRO=1 -DHAVE_GHOSTSCRIPT_GDEVDSP_H=1 -DHAVE_GS=1 -DLGF=1 -DINPUT_FOCUS=1 -DGS_EXEC=\"gs\" -DSPICE_EXEC=\"ngspice\" -DPROG_VERSION=\"3.10\" -DPROG_REVISION=\"30\" -DCAD_DIR=\"/usr/lib64\" -DTEMP_DIR=\"/tmp\" -DRESOURCES_DIR=\"/usr/lib64/xcircuit-3.10/app-defaults\" -DSCRIPTS_DIR=\"/usr/lib64/xcircuit-3.10\" -DBUILTINS_DIR=\"/usr/lib64/xcircuit-3.10\" -DBUILTINS_FILE=\"\" -DUSER_RC_FILE=\".xcircuitrc\" -DPROLOGUE_DIR=\"/usr/lib64/xcircuit-3.10\" -DPROLOGUE_FILE=\"xcircps2.pro\" -DCYRILLIC_ENC_FILE=\"cyrillic.enc\" -DISOLATIN2_ENC_FILE=\"isolatin2.enc\" -DISOLATIN5_ENC_FILE=\"isolatin5.enc\" -DSTARTUP_FILE=\"startup.script\" -DLGF_LIB=\"lgf.lps\" -DASG_SPICE_LIB=\"asg_spice.lps\" -I. -IXw -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/freetype2 -pipe -march=native -fstack-protector-all -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wno-pointer-sign -c -o xtgui.o xtgui.c
xtgui.c: In function ‘quitcheck’:
xtgui.c:566:34: error: passing argument 2 of ‘getgeneric’ from incompatible pointer type [-Werror=incompatible-pointer-types]
566 | savebutton = getgeneric(w, quitcheck, NULL);
| ^~~~~~~~~
| |
| int (*)(struct _WidgetRec *, char *, char *)
In file included from xtgui.c:59:
prototypes.h:607:48: note: expected ‘void (*)()’ but argument is of type ‘int (*)(struct _WidgetRec *, char *, char *)’
607 | extern buttonsave *getgeneric(xcWidget, void (*getfunction)(), void *);
| ~~~~~~~^~~~~~~~~~~~~~
xtgui.c: In function ‘outputpopup’:
xtgui.c:1028:22: warning: ‘%s’ directive writing up to 79 bytes into a region of size 75 [-Wformat-overflow=]
1028 | sprintf(edit[1], "%s", topobject->name);
| ^~
xtgui.c:1028:4: note: ‘sprintf’ output between 1 and 80 bytes into a destination of size 75
1028 | sprintf(edit[1], "%s", topobject->name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xtgui.c:1063:27: warning: ‘.ps’ directive writing 3 bytes into a region of size between 1 and 75 [-Wformat-overflow=]
1063 | sprintf(outname, "%s.ps", edit[0]);
| ^~~
xtgui.c:1063:7: note: ‘sprintf’ output between 4 and 78 bytes into a destination of size 75
1063 | sprintf(outname, "%s.ps", edit[0]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [Makefile:551: xtgui.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/sci-electronics/xcircuit-3.10.30-r2/work/xcircuit-3.10.30'
make[1]: Target 'all-am' not remade because of errors.
make: *** [Makefile:606: all-recursive] Error 1
make: Target 'all' not remade because of errors.