sergev / qemu

QEMU for PIC32
https://github.com/sergev/qemu/wiki
Other
29 stars 7 forks source link

Compile issue, directive output may be truncated #5

Open cratuki opened 4 years ago

cratuki commented 4 years ago

During compilation (latest debian, automatic use of gcc), I get this error,

block/blkdebug.c: In function ‘blkdebug_refresh_filename’:
block/blkdebug.c:752:31: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4086 [-Werror=format-truncation=]                                                                                       
                  "blkdebug:%s:%s",
                               ^~
In file included from /usr/include/stdio.h:873,
                 from /home/cturner/opt/20200306.musicbox.cturner.ac.sergev.qemu.mips.pic32/qemu/include/qemu-common.h:27,                                                                                                                    
                 from block/blkdebug.c:25:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 11 or more bytes (assuming 4106) into a destination of size 4096                                                                                   
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [/home/cturner/opt/20200306.musicbox.cturner.ac.sergev.qemu.mips.pic32/qemu/rules.mak:57: block/blkdebug.o] Error 1                                                                                                                 

It is not ideal, but I have found a fix for this here, which disables the warning: https://github.com/snippits/qemu-vpmu/issues/1