Bug 12474 - During samba 4.5.1 build on AIX 7.1 xlc compiler reports several wanings which ends with failed build
Summary: During samba 4.5.1 build on AIX 7.1 xlc compiler reports several wanings whic...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.5.1
Hardware: All AIX
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-21 16:04 UTC by Mark Kica
Modified: 2017-06-02 17:48 UTC (History)
1 user (show)

See Also:


Attachments
Fix for two build issues on AIX (5.25 KB, text/plain)
2017-06-02 17:48 UTC, Albert Chin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Kica 2016-12-21 16:04:04 UTC
During samba 4.5.1 build on AIX 7.1 xlc compiler reports several warnings which ends with failed build

Problems are in following source codes with initialization of structure

source4/torture/smb2/lock.c
source3/locking/brlock.c
source4/torture/smb2/replay.c
source4/torture/smb2/durable_v2_open.c


For example :


	lck = (struct smb2_lock) {
		.in.locks = &el,
		.in.lock_count	= 0x0001,
		.in.file.handle	= h     /* This is cause of warning , together with -Werr causes failed build */
	};

        This code can be simply replaced with following :

                ZERO_STRUCT(lck);
                lck.in.locks = ⪙
                lck.in.lock_count       = 0x0001;
                lck.in.file.handle      = h ;


Compiling source4/torture/smb2/durable_v2_open.c

"../source4/torture/smb2/smb2.c", line 50.12: 1506-068 (W) Operation between types "_Bool(*)(struct torture_context*,struct smb2_tree*)" and "void*" is not allowed.
"../source4/torture/smb2/smb2.c", line 74.18: 1506-068 (W) Operation between types "void*" and "_Bool(*)(struct torture_context*,struct smb2_tree*)" is not allowed.
"../source4/torture/smb2/smb2.c", line 110.12: 1506-068 (W) Operation between types "_Bool(*)(struct torture_context*,struct smb2_tree*,struct smb2_tree*)" and "void*" is not allowed.
"../source4/torture/smb2/smb2.c", line 138.18: 1506-068 (W) Operation between types "void*" and "_Bool(*)(struct torture_context*,struct smb2_tree*,struct smb2_tree*)" is not allowed.
Waf: Leaving directory `/data/kica_build/samba_git/samba-4.5.1/bin'
Build failed:  -> task failed (err #1):
             {task: cc lock.c -> lock_1.o}
make: 1254-004 The error code from the last command is 1.
Comment 1 Albert Chin 2017-06-02 17:48:17 UTC
Created attachment 13247 [details]
Fix for two build issues on AIX