We don't want more casts but fewer! Can it be fixed in a better way?
/Hans
On 11/06/2013 06:46 AM, praveen malviya wrote:
> Hi,
> Problem occurs with old versions of GCC. It works fine with gcc compilers >=
> 4.5.0.
> Here is the patch for it:
>
> diff --git a/osaf/services/saf/amf/amfnd/mbcsv.cc
> b/osaf/services/saf/amf/amfnd/mbcsv.cc
> --- a/osaf/services/saf/amf/amfnd/mbcsv.cc
> +++ b/osaf/services/saf/amf/amfnd/mbcsv.cc
> @@ -1290,7 +1290,7 @@ uint32_t avnd_evt_avd_role_change_evh(AV
> prev_ha_state = cb->avail_state_avnd;
>
> /* Ignore the duplicate roles. */
> - if (prev_ha_state == info->role) {
> + if (prev_ha_state == (SaAmfHAStateT)info->role) {
> return NCSCC_RC_SUCCESS;
> }
>
> Thanks,
> Praveen
> On 05-Nov-13 6:10 PM, Sirisha Alla wrote:
>> ------------------------------------------------------------------------------------------------------------------------
>>
>> *[tickets:#616] <http://sourceforge.net/p/opensaf/tickets/616/> latest
>> staging does not compile*
>>
>> *Status:* unassigned
>> *Created:* Tue Nov 05, 2013 12:40 PM UTC by Sirisha Alla
>> *Last Updated:* Tue Nov 05, 2013 12:40 PM UTC
>> *Owner:* nobody
>>
>> current default staging(cs 4585) does not compile with the following error
>>
>> g++ -DHAVE_CONFIG_H -I. -I../../../../.. -DSA_CLM_B01=1
>> -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/common/amf/include
>> -I../../../../../osaf/services/saf/amf/amfnd/include
>> -I../../../../../osaf/libs/common/immsv/include -Wall -fno-strict-aliasing
>> -Werror -fPIC -D__STDC_FORMAT_MACROS -O2 -g
>> -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector
>> -funwind-tables -fasynchronous-unwind-tables -MT
>> osafamfnd-mbcsv.o -MD -MP -MF .deps/osafamfnd-mbcsv.Tpo -c -o
>> osafamfnd-mbcsv.o |test -f 'mbcsv.cc' || echo './'|mbcsv.cc
>> cc1plus: warnings being treated as errors
>> mbcsv.cc: In function ‘uint32_t avnd_evt_avd_role_change_evh(AVND_CB/,
>> AVND_EVT/)’:
>> mbcsv.cc:1293: error: comparison between signed and unsigned integer
>> expressions
>> make[8]: */[osafamfnd-mbcsv.o] Error 1
>> make[8]: Leaving directory
>> |/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0/osaf/services/saf/amf/amfnd'
>> make[7]: *** [all-recursive] Error 1 make[7]: Leaving
>> directory|/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0/osaf/services/saf/amf/amfnd'
>> make[6]: /* [all-recursive] Error 1
>> make[6]: Leaving directory
>> |/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0/osaf/services/saf/amf'
>> make[5]: ***
>> [all-recursive] Error 1 make[5]: Leaving
>> directory|/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0/osaf/services/saf'
>> make[4]: */[all-recursive] Error 1
>> make[4]: Leaving directory
>> |/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0/osaf/services'
>> make[3]: ***
>> [all-recursive] Error 1 make[3]: Leaving
>> directory|/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0/osaf'
>> make[2]: /* [all-recursive] Error 1
>> make[2]: Leaving directory
>> |/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0' make[1]: *** [all]
>> Error 2
>> make[1]: Leaving
>> directory|/home/sirisha/staging_nov5th/rpms/BUILD/opensaf-4.4.M0'
>> error: Bad exit status from
>> /home/sirisha/staging_nov5th/rpms/tmp/rpm-tmp.10997 (%build)
>>
>> RPM build errors:
>> Bad exit status from /home/sirisha/staging_nov5th/rpms/tmp/rpm-tmp.10997
>> (%build)
>> make: *** [rpm] Error 1
>>
>> ------------------------------------------------------------------------------------------------------------------------
>>
>> Sent from sourceforge.net because [email protected] is
>> subscribed to
>> https://sourceforge.net/p/opensaf/tickets/
>>
>> To unsubscribe from further messages, a project admin can change settings at
>> https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
>> mailing list, you can unsubscribe from the
>> mailing list.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> November Webinars for C, C++, Fortran Developers
>> Accelerate application performance with scalable programming models. Explore
>> techniques for threading, error checking, porting, and tuning. Get the most
>> from the latest Intel processors and coprocessors. See abstracts and register
>> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>>
>>
>> _______________________________________________
>> Opensaf-tickets mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
>
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Opensaf-tickets mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
>
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets