[PATCH] Fix compiler warnings in defmod

Steve Fryatt lists at stevefryatt.org.uk
Thu Oct 28 19:32:20 BST 2021


On 8 Jan, Dave Lambley wrote in message
    <CAPCK=o9+8AkqhC8DhtxjueoQXmZfD7WUqPMentBohxMwKPWW5Q at mail.gmail.com>:

> The attached patch resolves warnings picked up by gcc and clang when
> compiling defmod. It now compiles cleanly on my amd64 machine.
> 
> There's a few silly fixes where there's no real problem, but also lots of
> apparently inadequately sized buffers. Also, lots of pointer casting
> shenanigans.

Thanks for these updates, which I've very belatedly got around to looking at
properly.

All of the changes look sane, but the updated compile flags stop DefMod
building at all on my system (Ubuntu 20.04) as GCC is now finding a number
of potentially undersized sprintf() buffers that it considers to be
show-stoppers.

I think the best thing for now is to put the patch into a branch so that
it's safe, and attempt to keep it up to date with changes on the trunk while
working through the new errors.

If anyone else fancies having a look, it's at ^/branches/squash-warnings

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/



More information about the oslib-user mailing list