On 2020/02/15 09:44, Alessandro De Laurenzis wrote: > Greetings, > > The attached diff updates cad/qrouter to the latest release. > > What's new upstream > =================== > After the recent thread about unbreaking this port for non-CLANG archs (see > [1]), I made a PR on github proposing (among other things) the needed patch > and it has been accepted; this is the only difference w.r.t. the previous > version (no functional modifications to the code). > > What's new in the port > ====================== > - Dropped patch-configure_in and patch-qrouter_h; > - Since we're already accepting that this code isn't C99 compliant, I > propose to clean-up a bit more the build log, adding > -Wno-implicit-function-declaration to CFLAG.
It's not just that it isn't C99 compliant, the missing declarations mean that the wrong types are used for some of the calls. This can result in some problems like pointers being truncated to 32 bits, it wouldn't surprise me if some of these might result in crashes on 64-bit arches. So I'd at least like to keep the warnings so it's easier for anyone tracking down bugs, if not actually fix (maybe just some of) them. Some already have declarations in headers and it just looks like the #includes are missing (tclqrouter.c uses functions defined in output.h, antenna.c uses some defined in mask.h and maze.h). Others are only declared in the .c files where the function is defined so declarations for those would need copying to a suitable header and #including where necessary (or just copying declarations to the c files where they're used, though headers are usually better).
