We have a number of compiler warnings like the ones below that we need to address: 370 lib/ldaputil/certmap.c: In function 'ldapu_set_cert_mapfn': 371 lib/ldaputil/certmap.c:1277: warning: dereferencing type-punned pointer will break strict-aliasing rules 372 lib/ldaputil/certmap.c: In function 'ldapu_get_cert_mapfn': 373 lib/ldaputil/certmap.c:1305: warning: dereferencing type-punned pointer will break strict-aliasing rules 374 lib/ldaputil/certmap.c: In function 'ldapu_set_cert_searchfn': 375 lib/ldaputil/certmap.c:1318: warning: dereferencing type-punned pointer will break strict-aliasing rules 376 lib/ldaputil/certmap.c: In function 'ldapu_get_cert_searchfn': 377 lib/ldaputil/certmap.c:1346: warning: dereferencing type-punned pointer will break strict-aliasing rules 378 lib/ldaputil/certmap.c: In function 'ldapu_set_cert_verifyfn': 379 lib/ldaputil/certmap.c:1359: warning: dereferencing type-punned pointer will break strict-aliasing rules We can fix these issues in the code, or build with the -fno-strict-aliasing compiler option.
Created attachment 402710 [details] 0001-Bug-455489-Address-compiler-warnings-about-strict-al.patch After applying the patch, the code was compiled as follows: % export CFLAGS="-g -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings" % configure --enable-debug % make There is no more warnings about strict-aliasing rules.
To ssh://git.fedorahosted.org/git/389/ds.git c1d2e74..65e04b8 master -> master commit 65e04b8d72fa0ebe8a4c8475c6bc26ac831f984f Author: Endi S. Dewata <edewata> Date: Sun Mar 21 23:15:56 2010 -0500 Fix description: The codes that generate strict-aliasing warnings have been changed. Reviewed by: rmeggins (and pushed by)
Dev Verified.