Page 1 of 1

-Wconversion and libnds/include/*

Posted: Mon Dec 20, 2021 10:41 am
by PypeBros
Hi. While I had -Wconversion turned on for some debug build, I noticed that many of the libnds header files do not like that flag very much, but it also seem that they wouldn't require that much effort to support it.

One key element to fix seems to be the definition of

Code: Select all

BIT(n)
so that it produces an unsigned value (as most registers are defined as volatile unsigned registers and will receive values built from BIT()).

Although my install of libnds is a bit dated (1.7.3-1), I noted that none of this seems to have been fixed in the latest github version.
1) do you have any interest in having headers of libnds allowing -Wconversion flag (I feel it helps a lot with finding some arithmetic error in general)
2) would you like me to try getting the full set of latest headers work with it and then submit a patch ?

Best regards and best wishes for passing year *<:-)