libiscsi error

26 views
Skip to first unread message

Ankit Malik

unread,
Mar 23, 2016, 9:01:17 AM3/23/16
to libiscsi
Hello,
Iam seeing below error for couple of weeks. Can you please look into the issue.

depbase=`echo test_multipathio_async_caw.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../include "-D_U_=__attribute__((unused)) " "-D_R_(A,B)=__attribute__((format(printf,A,B)))"  -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -Wwrite-strings -g -O2 -MT test_multipathio_async_caw.o -MD -MP -MF $depbase.Tpo -c -o test_multipathio_async_caw.o test_multipathio_async_caw.c &&\
	mv -f $depbase.Tpo $depbase.Po
make[1]: Leaving directory `/libiscsitest/test-tool'
[WARN] 2016-03-22 13:39:19.312428 ============================================================
[WARN] 2016-03-22 13:39:19.312498 ====== TEST FAIL
[WARN] 2016-03-22 13:39:19.312519 ============================================================
test_multipathio_async_caw.c: In function ‘test_mpio_async_caw’:
test_multipathio_async_caw.c:105:9: error: missing initializer [-Werror=missing-field-initializers]
test_multipathio_async_caw.c:105:9: error: (near initialization for ‘state.completed’) [-Werror=missing-field-initializers]
cc1: all warnings being treated as errors
make[1]: *** [test_multipathio_async_caw.o] Error 1
make: *** [install-recursive] Error 1

Thanks

di9...@gmail.com

unread,
Apr 1, 2016, 4:36:42 AM4/1/16
to libiscsi
This is a known issue reported by others

The root of the problem is the flag

missing-field-initializers

So this do not work since the struct is missing initializers
struct
test_mpio_async_caw_state state = { 0 };

The struct is found in the same source file, you need to
init the struct field by field. Thus this should work
struct test_mpio_async_caw_state state = { 0, 0, 0 };

Sitsofe Wheeler

unread,
Apr 2, 2016, 3:59:14 AM4/2/16
to libi...@googlegroups.com
On 1 April 2016 at 09:36, <di9...@gmail.com> wrote:
This is a known issue reported by others

The root of the problem is the flag

missing-field-initializers

So this do not work since the struct is missing initializers
struct
test_mpio_async_caw_state state = { 0 };

I filed a pull request (https://github.com/sahlberg/libiscsi/pull/199 ) that fixes up the "warnings" I hit concerning this a few days ago...

--

ronnie sahlberg

unread,
Apr 3, 2016, 1:02:12 PM4/3/16
to libiscsi
I have merged Sistofe's patch to fix this.
Thanks!
> --
> You received this message because you are subscribed to the Google Groups
> "libiscsi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to libiscsi+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages