Quantcast

MinGW toolchain warnings

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MinGW toolchain warnings

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 (%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: In
function ‘check_outfile’:
/home/user/Documents/versioned/libftdi/examples/stream_test.c:339:90:
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:339:37:
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:339:90:
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:339:37:
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:353:53:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                                                     ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:353:29:
warning: too many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:353:53:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                                                     ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:353:29:
warning: too many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:356:32:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                                ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:356:29:
warning: too many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                             ^~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Documents/versioned/libftdi/examples/stream_test.c:356:32:
warning: unknown conversion type character ‘l’ in format [-Wformat=]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                                ^
/home/user/Documents/versioned/libftdi/examples/stream_test.c:356:29:
warning: too many arguments for format [-Wformat-extra-args]
             fprintf(stderr, "%llu blocks all fine\n", (unsigned long
long) blocks);
                             ^~~~~~~~~~~~~~~~~~~~~~~~
[ 33%] Linking C executable stream_test.exe
[ 33%] Built target stream_test
[ 37%] Building C object examples/CMakeFiles/bitbang2.dir/bitbang2.c.obj
[ 40%] Linking C executable bitbang2.exe
[ 40%] Built target bitbang2
[ 44%] Building C object examples/CMakeFiles/bitbang.dir/bitbang.c.obj
/home/user/Documents/versioned/libftdi/examples/bitbang.c: In function ‘main’:
/home/user/Documents/versioned/libftdi/examples/bitbang.c:64:21:
warning: unknown conversion type character ‘h’ in format [-Wformat=]
         printf("%02hhx ",buf[0]);
                     ^
/home/user/Documents/versioned/libftdi/examples/bitbang.c:64:16:
warning: too many arguments for format [-Wformat-extra-args]
         printf("%02hhx ",buf[0]);
                ^~~~~~~~~
/home/user/Documents/versioned/libftdi/examples/bitbang.c:64:21:
warning: unknown conversion type character ‘h’ in format [-Wformat=]
         printf("%02hhx ",buf[0]);
                     ^
/home/user/Documents/versioned/libftdi/examples/bitbang.c:64:16:
warning: too many arguments for format [-Wformat-extra-args]
         printf("%02hhx ",buf[0]);
                ^~~~~~~~~

Regards,
Yegor

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MinGW toolchain warnings

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:[hidden email]

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...