Hi Mahesh, One question/comment below. /Thanks HansN
-----Original Message----- From: A V Mahesh [mailto:mahesh.va...@oracle.com] Sent: den 30 augusti 2016 08:09 To: praveen malviya <praveen.malv...@oracle.com>; opensaf-devel@lists.sourceforge.net Subject: Re: [devel] staging changeset: 7982 with gcc version 4.8.3 build failed Ok, I just pushed changeset: 7989:4d6caf6903cd tag: tip user: A V Mahesh <mahesh.va...@oracle.com> date: Tue Aug 30 11:05:31 2016 +0530 summary: clm: test code build fix [#1906] -AVM On 8/30/2016 11:28 AM, praveen malviya wrote: > Hi Mahesh, > > I think this patch can be pushed as a workaround patch. Any > improvement on it can be taken up by CLM maintainers post FC tag. > > Thanks, > Praveen > > On 30-Aug-16 11:17 AM, A V Mahesh wrote: >> Hi Zoran Milinkovic, >> >> If below changes ok , we can push directly. >> >> ===================================================================== >> ====== >> >> diff --git a/tests/clmsv/tet_ClmLongRdn.c >> b/tests/clmsv/tet_ClmLongRdn.c >> --- a/tests/clmsv/tet_ClmLongRdn.c >> +++ b/tests/clmsv/tet_ClmLongRdn.c >> @@ -188,19 +188,21 @@ static SaClmCallbacksT_4 clmCallback4 = >> static SaClmCallbacksT clmCallback = { nodeGetCallBack, >> clmTrackCallback }; >> >> static void unlock_node(char *nodename) { >> + int rc; >> char command[1024]; >> >> // Unlock the node >> sprintf(command, "immadm -o 1 %s", nodename); >> - system(command); >> + assert(rc = system(command) != -1); [HansN] I know this is test code but side effects in asserts is to be avoided, but, shouldn't the code be like: rc = system(command); int status = WEXITSTATUS(rc); osaf_assert(status != SA_AIS_OK); ? >> + >> } >> >> static void lock_node(char *nodename) { >> + int rc; >> char command[1024]; >> - >> // Lock the node >> sprintf(command, "immadm -o 2 %s", nodename); >> - system(command); >> + assert(rc = system(command) != -1); >> } >> >> static void remove_node(char *nodename) { @@ -209,7 +211,7 @@ >> static void remove_node(char *nodename) >> >> // Lock the node >> sprintf(command, "immadm -o 2 %s", nodename); >> - system(command); >> + assert(rc = system(command) != -1); >> >> // Remove the node >> sprintf(command, "immcfg -d %s", nodename); >> ===================================================================== >> ====== >> >> >> -AVM >> >> On 8/30/2016 10:46 AM, A V Mahesh wrote: >>> Hi All, >>> >>> I just build http://hg.code.sf.net/p/opensaf/staging with following >>> changeset as sanity test >>> >>> it build failed with . >>> >>> changeset: 7982:106230d848a6 >>> tag: tip >>> parent: 7979:aec46cc64cc8 >>> user: Anders Widell <anders.wid...@ericsson.com> >>> date: Mon Aug 29 19:29:55 2016 +0200 >>> summary: uml: Update the UML environment [#1979] >>> >>> ==================================================================== >>> =============== >>> >>> >>> /gcc -DHAVE_CONFIG_H -I. -I../.. -DSA_CLM_B01=1 -I../.. >>> -I../../osaf/libs/saf/include -I../../osaf/libs/core/include >>> -I../../osaf/libs/core/leap/include >>> -I../../osaf/libs/core/mds/include >>> -I../../osaf/libs/core/common/include >>> -I../../osaf/libs/core/cplusplus -I../../tests/unit_test_fw/inc >>> -std=gnu11 -Wall -fno-strict-aliasing -Werror -fPIC >>> -D_FORTIFY_SOURCE=2 -fstack-protector -DINTERNAL_VERSION_ID='""' -O2 >>> -g -m64 -fmessage-length=0 >>> -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables >>> -fasynchronous-unwind-tables -MT clmtest-tet_ClmLongRdn.o -MD -MP >>> -MF .deps/clmtest-tet_ClmLongRdn.Tpo -c -o clmtest-tet_ClmLongRdn.o >>> `test -f 'tet_ClmLongRdn.c' || echo './'`tet_ClmLongRdn.c >>> tet_ClmLongRdn.c: In function ‘lock_node’: >>> tet_ClmLongRdn.c:203:8: error: ignoring return value of >>> ‘system’, declared with attribute warn_unused_result >>> [-Werror=unused-result] >>> system(command); >>> ^ >>> tet_ClmLongRdn.c: In function ‘unlock_node’: >>> tet_ClmLongRdn.c:195:8: error: ignoring return value of >>> ‘system’, declared with attribute warn_unused_result >>> [-Werror=unused-result] >>> system(command); >>> ^ >>> tet_ClmLongRdn.c: In function ‘remove_node’: >>> tet_ClmLongRdn.c:212:8: error: ignoring return value of >>> ‘system’, declared with attribute warn_unused_result >>> [-Werror=unused-result] >>> system(command); >>> ^ >>> cc1: all warnings being treated as errors >>> make[3]: *** [clmtest-tet_ClmLongRdn.o] Error 1 >>> make[3]: Leaving directory >>> `/avm/staging-publish/rpms/BUILD/opensaf-5.1.M0/tests/clmsv' >>> make[2]: *** [all-recursive] Error 1 >>> make[2]: Leaving directory >>> `/avm/staging-publish/rpms/BUILD/opensaf-5.1.M0' >>> make[1]: *** [all] Error 2 >>> make[1]: Leaving directory >>> `/avm/staging-publish/rpms/BUILD/opensaf-5.1.M0' >>> error: Bad exit status from >>> /avm/staging-publish/rpms/tmp/rpm-tmp.13949 >>> (%build) >>> >>> >>> RPM build errors: >>> Bad exit status from >>> /avm/staging-publish/rpms/tmp/rpm-tmp.13949 >>> (%build) >>> make: *** [rpm] Error 1 >>> SC-1:/avm/staging-publish # / >>> >>> ==================================================================== >>> =============== >>> >>> >>> -AVM >>> >>> >>> -------------------------------------------------------------------- >>> ---------- >>> >>> _______________________________________________ >>> Opensaf-devel mailing list >>> Opensaf-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/opensaf-devel >> >> >> --------------------------------------------------------------------- >> --------- >> >> _______________________________________________ >> Opensaf-devel mailing list >> Opensaf-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/opensaf-devel >> ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel