Geert, commit 2a8a4ef42b61e72510d3012474e69f76593a5eb3
is incorrect. On a MINGW the __USE_MINGW_ANSI_STDIO should be
defined _before_ #include
New patch is in attachment.
Two another patches for mingwfication also included.
As a result there are now only few C11 printf format warnings. See
'urjtag_err.txt'.
Is there a way to replace this printf format with more generic (C'99) format ?
The most dangerous seems are in 'src/bus/readmem.c' and 'src/bus/writemem.c'
Another issue on a Windows environment is a place for the DATA folder.
On a modern Windows8,10 the "C:\Program Files" is not accessible
for non-privileged applications. Correct place seems a 'C:\ProgramData".
Unfortunately it is impossible to pass this value to the urjtag's build
system.
urjtag-git/urjtag/src/lib/getdelim.c
getdelim.c:36:1: warning: no previous prototype for ‘getdelim’
[-Wmissing-prototypes]
getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream)
^~~~
urjtag-git/urjtag/src/tap/detect.c
detect.c:293:44: note: in expansion of macro ‘_’
urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: %s (0x%0*" PRIX64
")\n"),
^
detect.c:342:44: warning: unknown conversion type character ‘l’ in format
[-Wformat=]
detect.c:372:44: note: in expansion of macro ‘_’
urj_log (URJ_LOG_LEVEL_NORMAL, _(" Part(%d): %s
(0x%03"PRIX64")\n"),
^
../../include/urjtag/gettext.h:47:41: warning: too many arguments for format
[-Wformat-extra-args]
urjtag-git/urjtag/src/tap/cable/generic.c
cable/generic.c:435:22: warning: format ‘%lu’ expects argument of type ‘long
unsigned int’, but argument 6 has type ‘long double’ [-Wformat=]
"new real frequency %Lg, delay %lu\n",
urjtag-git/urjtag/src/bus/readmem.c
readmem.c:118:44: note: in expansion of macro ‘_’
urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08llX\r"),
^
../../include/urjtag/gettext.h:47:41: warning: too many arguments for format
[-Wformat-extra-args]
urjtag-git/urjtag/src/bus/writemem.c
wwritemem.c:96:44: note: in expansion of macro ‘_’
urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08llX\r"),
^
../../include/urjtag/gettext.h:47:41: warning: unknown conversion type
character ‘z’ in format [-Wformat=]
urjtag-git/urjtag/src/cmd/cmd_print.c
cmd_print.c:227:30: note: in expansion of macro ‘_’
_("Error in bus area discovery at 0x%08llX\n"),
^
../../include/urjtag/gettext.h:47:41: warning: unknown conversion type
character ‘l’ in format [-Wformat=]
cmd_print.c:235:34: note: in expansion of macro ‘_’
_("\tstart: 0x%08lX, length: 0x%08llX, data
width: %d bit, (%s)\n"),
^
../../include/urjtag/gettext.h:47:41: warning: unknown conversion type
character ‘l’ in format [-Wformat=]
cmd_print.c:241:34: note: in expansion of macro ‘_’
_("\tstart: 0x%08lX, length: 0x%08llX, data
width: %d bit\n"),
^
../../include/urjtag/gettext.h:47:41: warning: too many arguments for format
[-Wformat-extra-args]
urjtag-git/urjtag/src/cmd/cmd_dr.c
cmd_dr.c:100:36: warning: unknown conversion type character ‘l’ in format
[-Wformat=]
urj_log (URJ_LOG_LEVEL_NORMAL, "%s (0x%0*" PRIX64 ")\n",
^
rjtag-git/urjtag/src/cmd/cmd_bfin.c
cmd_bfin.c:429:44: warning: too many arguments for format [-Wformat-extra-args]
urj_log (URJ_LOG_LEVEL_NORMAL, "EMUDAT = 0x%"PRIx64"\n", emudat);
^
urjtag-git/urjtag/src/bsdl/bsdl_sem.c
bsdl_sem.c:178:40: warning: too many arguments for format [-Wformat-extra-args]
urj_log (URJ_LOG_LEVEL_NORMAL, "register %s %zd\n", reg_name, len);
^
svf_flex.l:424:49: note: in expansion of macro ‘_’
urj_error_set (URJ_ERROR_OUT_OF_MEMORY, _("malloc(%zd) fails"),
^
../../include/urjtag/gettext.h:47:41: warning: too many arguments for format
[-Wformat-extra-args]
bsdl_sem.c:178:40: warning: unknown conversion type character ‘z’ in format
[-Wformat=]
urj_log (URJ_LOG_LEVEL_NORMAL, "register %s %zd\n", reg_name, len);
^
0001-use-path-separator-on-MINGW.patch
Description: Binary data
0001-Define-__USE_MINGW_ANSI_STDIO-before-include-stdio.h.patch
Description: Binary data
0001-flash-jedec.c-use-sysdep.h.patch
Description: Binary data
___
UrJTAG-development mailing list
UrJTAG-development@lists.sourceforge.net