Following warnings still remain so far.
src/tuxpaint.c:199:2: warning: #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR" [-Wcpp]
199 | #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR"
| ^~~~~~~
src/parse.gperf: In function 'parse_one_option':
src/parse.gperf:306:45: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'char *' as the destination; expected 'char' or an explicit length [-Wsizeof-pointer-memaccess]
306 | memcpy(offset+(char*)tmpcfg, &opt, sizeof(char*)); /* FIXME: This causes a warning; should it be 'sizeof(char)', or do we need to have the warning suppressed? -bjk 2021.10.14 */
| ^~~~
src/dirwalk.c: In function 'tp_ftw':
src/dirwalk.c:348:2: warning: #warning Failed to see DT_UNKNOWN [-Wcpp]
348 | #warning Failed to see DT_UNKNOWN
| ^~~~~~~
src/get_fname.c: In function 'get_fname':
src/get_fname.c💯3: warning: 'dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
100 | snprintf(f, sizeof(f),
| ^~~~~~~~~~~~~~~~~~~~~~
101 | "%s%c%s",
| ~~~~~~~~~
102 | dir, (*name) ? '/' : '\0', /* Some mkdir()'s don't like trailing slashes */
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103 | name);
| ~~~~~
magic/src/cartoon.c:178:99: warning: unused parameter 'last' [-Wunused-parameter]
178 | static void do_cartoon(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last, int x, int y)
| ~~~~~~~~~~~~~~^~~~
When assembling UTF-8 in render_text_w() (to send to SDL_Pango),
we assumed `wchar_t` could encompass the entirety of Unicode
(up to U+10FFFF); however, on Windows `wchar_t` is only 16-bits,
meaning the test for characters <= U+FFFF was always true.
This reworks the if/elseif/else block, via some "#ifndef WIN32"
tests, to avoid this warning.
In the end, we need to replace our internal use of `wchar_t`
with something 32-bit, to allow for higher Unicode code points
(e.g., to support Emoji via the Text and Label tools).
Additonally, some work will need to be done to ensure that
text stored as Labels within saved Tux Paint images (PNGs) continued
to work correctly, and could be traded between platforms.
(Untested, but right now I assume a picture drawn on Linux where
`wchar_t` is 32-bit would break if you attempt to load it on Windows,
and possibly vice-versa?)
See https://sourceforge.net/p/tuxpaint/feature-requests/210/
More DEBUG output. Looking into having SDL_ttf open a font,
get its name, and then see whether SDL_Pango can load it.
(If not, fall back to SDL_ttf.)
That code is not working, and "#if 0"'d out, for the moment.
...such as those we seem to be receiving from _nl_locale_name()
on 64-bit Windows under newer MinGW/MSYS (see big thread on
tuxpaint-devel with reports from Shin-ichi).