[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disk/mdraid1x_linux.c:181:15: warning: array subscript ...

From: PGNet Dev
Subject: Re: disk/mdraid1x_linux.c:181:15: warning: array subscript ...
Date: Wed, 25 Mar 2020 08:35:58 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 3/25/20 12:27 AM, Michael Chang wrote:
> It would be great if you can help to test patch to solve the build
> problem for gcc-10 in your system or not.

with your patches, no immediate mdraid1x or zfs build errors
one does surface, now, for ntfscomp ...

gcc --version
        gcc (SUSE Linux) 10.0.1 20200320 (experimental) [revision 

cd grub
git log -n1
      1 commit 552c9fd08122a3036c724ce96dfe68aa2f75705f (HEAD -> master, 
origin/master, origin/HEAD)
      2 Author: Patrick Steinhardt <address@hidden>
      3 Date:   Sat Mar 7 17:29:09 2020 +0100

patch -p1 < 
        patching file grub-core/disk/mdraid1x_linux.c
patch -p1 < 
        patching file grub-core/fs/zfs/zfs.c
        patching file include/grub/zfs/zap_leaf.h

unset CC CPP
make V=1 -j${CORES}
        make[2]: Entering directory '/usr/local/src/grub'
        gcc -DHAVE_CONFIG_H -I.  -Wall -W -DGRUB_UTIL=1 -D_FILE_OFFSET_BITS=64 
-I./include -DGRUB_FILE=\"grub-core/fs/ntfscomp.c\" -I. -I. -I. -I. -I./include 
-I./include -I./grub-core/lib/libgcrypt-grub/src/  -I./grub-core/lib/minilzo 
-I./grub-core/lib/xzembed -I./grub-core/lib/zstd -DMINILZO_HAVE_CONFIG_H -O3 
-Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables 
-fmessage-length=0 -grecord-gcc-switches -march=native -mtune=native 
-D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -Wall -W -Wshadow -Wpointer-arith 
-Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations 
-Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args 
-Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration 
-Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar 
-Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch 
-Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label 
-Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings 
-Wnested-externs -Wstrict-prototypes -Wcast-align  -Wextra -Wattributes 
-Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch 
-Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast 
-Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign 
-Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 
-Werror  -fno-builtin -Wno-undef -O3 -Wall -fstack-protector-strong 
-funwind-tables -fasynchronous-unwind-tables -fmessage-length=0 
-grecord-gcc-switches -march=native -mtune=native -MT 
grub-core/fs/libgrubmods_a-ntfscomp.o -MD -MP -MF 
grub-core/fs/.deps-util/libgrubmods_a-ntfscomp.Tpo -c -o 
grub-core/fs/libgrubmods_a-ntfscomp.o `test -f 'grub-core/fs/ntfscomp.c' || 
echo './'`grub-core/fs/ntfscomp.c
        grub-core/fs/ntfscomp.c: In function ‘read_block’:
        grub-core/fs/ntfscomp.c:82:11: error: ‘flg’ may be used uninitialized 
in this function [-Werror=maybe-uninitialized]
           82 |       if (flg & 0x8000)
              |           ^~~
        grub-core/fs/ntfscomp.c:74:17: note: ‘flg’ was declared here
           74 |   grub_uint16_t flg, cnt;
              |                 ^~~
        cc1: all warnings being treated as errors
        make[2]: *** [Makefile:7647: grub-core/fs/libgrubmods_a-ntfscomp.o] 
Error 1
        make[2]: Leaving directory '/usr/local/src/grub'
        make[1]: *** [Makefile:11920: all-recursive] Error 1
        make[1]: Leaving directory '/usr/local/src/grub'
        make: *** [Makefile:3772: all] Error 2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]