Menu

Commit [r13002]  Maximize  Restore  History

Fix clean-build breakage from r13001, two latent pointer bugs, and ~700 warnings

r13001 broke "make cleanall && make": having every generated API .c include
a4gl_API_<x>.h assumed the incl/a4gl_API_*.h naming used by lib/libaubit4gl
and compilers/4glc, but lib/liblogical/processor and lib/liblogical/layout_engine
generate a local API_<x>.h instead, so they failed with "a4gl_API_process.h: No
such file or directory".

- lib/bin/dlmagic, lib/bin/dlmagic_c.awk: drop the api_header include again.
The _lib.h include stays - that is the actual fix for the _self.c files, and
-S is only ever used from the two directories that follow that convention.

Two of these are real bugs rather than cosmetics, both dormant until libcurl
and the ODBC headers were actually in play:

- lib/libsql/odbc/sql.c: SQLLEN was #define'd to int, but the bundled
tools/odbctest/incl headers declare SQLBindCol's StrLen_or_Ind parameter as
SQLINTEGER *, which is long * there - the driver was writing 8 bytes into
4 byte indicator fields on any LP64 platform. Define it as SQLINTEGER.
- lib/liblogical/common/a4gl_lle.c: the HAVE_LIBCURL branch calls url_fopen()
and friends without including a4gl_curl.h, and held the handle in a FILE *
rather than a URL_FILE *. Same bug curl.c had, and equally invisible until
libcurl is installed.

Warning cleanup - a full build goes from 2722 to 2022 warnings on the same
files. Every diagnostic that GCC 14/15 turns into a hard error is now gone
(incompatible-pointer-types 11 -> 0, implicit-function-declaration 5 -> 0,
int-conversion, implicit-int and return-mismatch all 0), so the Ubuntu 26.04
build should get through the whole tree rather than stopping at curl.c.

- compilers/xgen/x.yacc: the generated .xo.c/.xi.c loops compared an int
counter against the XDR _len members, which are u_int. Cast, as the
surrounding generated code already does: common/dataio 220 warnings -> 0.
- incl/Makefile-common.in, lib/libsql/odbc/Makefile: build sqlite3odbc.c,
Christian Werner's ODBC driver vendored from upstream, without our warning
set - same reasoning as the rpcgen output in common/dataio. 318 -> 0. The
-Wno- flags in WARN_THIRDPARTY follow -w deliberately: from GCC 14 those
diagnostics are errors, and -w does not switch an error off.
- lib/libsql/esqlc/Makefile, esql.ec: the ifx_hostvar_t descriptors written by
Informix's own esql preprocessor never initialise the trailing "reserved"
member (119 warnings we cannot fix in our source), and sqgetdbs() is exported
by the ESQL/C library but declared in none of the shipped headers. 124 -> 4.
- incl/a4gl_incl_4glhdr.h: LABEL_USED is now __attribute__((unused)), so the
END_BLOCK_n/CONTINUE_BLOCK_n labels in generated 4GL code stop warning. The
original attempt at this was commented out because it said "used", which is
not valid on a label. 58 -> 0 across every compiled .4gl.
- compilers/fcompile/dump_scr.c: default: break; on five switches over enums
where the unhandled values are deliberately ignored. 63 -> 0.
- tools/adbload2/a4gl_dbload_int.h: prototypes for a4gl_dbload_yyparse() and
yywrap().

Still outstanding, all in hand-written code and needing a decision per site:
sign-compare (1106, mostly dump_form.c, compile_c.c and lint.c),
unused-but-set-variable (303), unused-variable (64), missing-prototypes (61).

mikeaubury 2 days ago

changed /aubit4glsrc/trunk/compilers/fcompile/dump_scr.c
changed /aubit4glsrc/trunk/compilers/xgen/x.yacc
changed /aubit4glsrc/trunk/incl/Makefile-common.in
changed /aubit4glsrc/trunk/incl/a4gl_incl_4glhdr.h
changed /aubit4glsrc/trunk/lib/bin/dlmagic
changed /aubit4glsrc/trunk/lib/bin/dlmagic_c.awk
changed /aubit4glsrc/trunk/lib/liblogical/common/a4gl_lle.c
changed /aubit4glsrc/trunk/lib/libsql/esqlc/Makefile
changed /aubit4glsrc/trunk/lib/libsql/esqlc/esql.ec
changed /aubit4glsrc/trunk/lib/libsql/odbc/Makefile
changed /aubit4glsrc/trunk/lib/libsql/odbc/sql.c
changed /aubit4glsrc/trunk/tools/adbload2/a4gl_dbload_int.h
/aubit4glsrc/trunk/compilers/fcompile/dump_scr.c Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/compilers/xgen/x.yacc Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/incl/Makefile-common.in Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/incl/a4gl_incl_4glhdr.h Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/bin/dlmagic Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/bin/dlmagic_c.awk Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/liblogical/common/a4gl_lle.c Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/libsql/esqlc/Makefile Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/libsql/esqlc/esql.ec Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/libsql/odbc/Makefile Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/libsql/odbc/sql.c Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/tools/adbload2/a4gl_dbload_int.h Diff Switch to side-by-side view
Loading...