Re: MinGW toolchain warnings

2017-04-12 Thread Paul Fertser
Hello Yegor,

On Wed, Apr 12, 2017 at 08:00:32AM +0200, Yegor Yefremov wrote:
> compiling libftdi with mingw toolchain produces following warnings:
> 
> [ 29%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.obj
> /home/user/Documents/versioned/libftdi/examples/stream_test.c: In
> function ‘readCallback’:
> /home/user/Documents/versioned/libftdi/examples/stream_test.c:86:89:
> warning: unknown conversion type character ‘l’ in format [-Wformat=]

mingw toolchain doesn't aim for C99 compatibility and so certain
features are not supported (say thanks to ms).

I suggest you use MinGW-w64 toolchain instead, as it does the right
thing. You can get it easily along with all the other useful software
via MSYS2 if you're doing native windows development or from a distro
repository if you're on GNU/Linux.

HTH
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com   



MinGW toolchain warnings

2017-04-12 Thread Yegor Yefremov
Hi Thomas,

compiling libftdi with mingw toolchain produces following warnings:

[ 29%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.obj
/home/user/Documents/versioned/libftdi/examples/stream_test.c: In
function ‘readCallback’:
/home/user/Documents/versioned/libftdi/examples/stream_test.c:86:89:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

  ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:86:36:
warning: too many arguments for format [-Wformat-extra-args]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:86:89:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

  ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:86:36:
warning: too many arguments for format [-Wformat-extra-args]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:101:89:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

  ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:101:36:
warning: too many arguments for format [-Wformat-extra-args]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:101:89:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

  ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:101:36:
warning: too many arguments for format [-Wformat-extra-args]
fprintf(stderr, "Skip %7d blocks from 0x%08x to
0x%08x at blocks %10llu\n",

^~
/home/user/Documents/versioned/libftdi/examples/stream_test.c: In
function ‘main’:
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:39:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
   ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:51:
warning: unknown conversion type character ‘L’ in format [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
   ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:57:
warning: format ‘%d’ expects argument of type ‘int’, but argument 4
has type ‘long long unsigned int’ [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
 ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:61:
warning: unknown conversion type character ‘L’ in format [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
 ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:23:
warning: too many arguments for format [-Wformat-extra-args]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",

^~~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:39:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
   ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:51:
warning: unknown conversion type character ‘L’ in format [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
   ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:57:
warning: format ‘%d’ expects argument of type ‘int’, but argument 4
has type ‘long long unsigned int’ [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le)
blocks skipped\n",
 ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:250:61:
warning: unknown conversion type character ‘L’ in format [-Wformat=]
fprintf(stderr,"%d errors of %llu blocks (%Le), %d