Addressed warnings when compiling on MinGW/MSYS
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)
| ~~~~~~~~~~~~~~^~~~
This commit is contained in:
parent
ee83ee090e
commit
7c8f6bca80
4 changed files with 17 additions and 6 deletions
|
|
@ -14611,10 +14611,10 @@ static void do_png_embed_data(png_structp png_ptr)
|
|||
#ifdef WIN32
|
||||
iconv_t trans;
|
||||
wchar_t *wch;
|
||||
char *ch;
|
||||
char *conv, *conv2;
|
||||
size_t in, out;
|
||||
|
||||
in = out = 1;
|
||||
conv = malloc(255);
|
||||
trans = iconv_open("UTF-8", "WCHAR_T");
|
||||
|
||||
|
|
@ -14625,7 +14625,8 @@ static void do_png_embed_data(png_structp png_ptr)
|
|||
in = 2;
|
||||
out = 10;
|
||||
wch = ¤t_node->save_texttool_str[i];
|
||||
iconv(trans, (char **)&wch, &in, &conv, &out);
|
||||
ch = (char *)wch;
|
||||
iconv(trans, &ch, &in, &conv, &out);
|
||||
conv[0] = '\0';
|
||||
fprintf(lfi, "%s", conv2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue