OpenSAF fails to build with GCC 5.1.0, due to new compiler warnings:
imma_proc.c: In function 'imma_proc_increment_pending_reply': imma_proc.c:3324:28: error: comparison of constant '255' with boolean expression is always true [-Werror=bool-compare] if (cl_node->replyPending < 0xff) { ^ imma_proc.c: In function 'imma_proc_decrement_pending_reply': imma_proc.c:3337:29: error: comparison of constant '255' with boolean expression is always true [-Werror=bool-compare] if (cl_node->replyPending < 0xff) { ^ susm.cc: In function 'uint32_t avnd_evt_avd_su_pres_evh(AVND_CB*, AVND_EVT*)': susm.cc:1237:26: error: switch condition has type bool [-Werror=switch-bool] switch (info->term_state) { ^ mds_dt_tipc.c: In function 'mdtm_tipc_init': mds_dt_tipc.c:245:28: error: comparison of constant '2' with boolean expression is always false [-Werror=bool-compare] if (mds_use_network_order == NCSCC_RC_FAILURE) { ^ plms_hsm.c: In function 'hsm_discover_and_dispatch': plms_hsm.c:685:20: error: unused variable 'my_entity_path' [-Werror=unused-variable] SaHpiEntityPathT my_entity_path; ^ plms_hsm.c:684:20: error: unused variable 'hpirc' [-Werror=unused-variable] SaErrorT hpirc = SA_OK; ^
The imma_proc.c warning/error is a serious bug.
At some point cl_node->replyPending was changed from an uint8 to a bool.
What was not considered at that time was that this member is not just used for synchronous downcalls
And reply, but also for the asynchronous om-admin-op downcall and its corresponding om side admin-op-reply-callback.
Although not many applications use the asynchronous admin-op API, the ones who do may encounter resurrect problems.
probably of both kinds, i.e. not invalidating a handle that should be invalidated because IMMND broke contact when not all
asynchronous requests had been replied to; and possibly also unnecessary failure to resurrect due to the unclear effect of repeated decrement
on a Boolean.
Should be a separate ticket on imam lib.
/AndersBj
From: Anders Widell [mailto:anders-w@users.sf.net]
Sent: den 24 april 2015 13:38
To: opensaf-tickets@lists.sourceforge.net
Subject: [tickets] [opensaf:tickets] #1340 osaf: Build fails with GCC 5.1.0
[tickets:#1340]http://sourceforge.net/p/opensaf/tickets/1340 osaf: Build fails with GCC 5.1.0
Status: accepted
Milestone: 4.5.2
Created: Fri Apr 24, 2015 11:37 AM UTC by Anders Widell
Last Updated: Fri Apr 24, 2015 11:37 AM UTC
Owner: Anders Widell
OpenSAF fails to build with GCC 5.1.0, due to new compiler warnings:
imma_proc.c: In function 'imma_proc_increment_pending_reply':
imma_proc.c:3324:28: error: comparison of constant '255' with boolean expression is always true [-Werror=bool-compare]
if (cl_node->replyPending < 0xff) {
imma_proc.c: In function 'imma_proc_decrement_pending_reply':
imma_proc.c:3337:29: error: comparison of constant '255' with boolean expression is always true [-Werror=bool-compare]
if (cl_node->replyPending < 0xff) {
susm.cc: In function 'uint32_t avnd_evt_avd_su_pres_evh(AVND_CB, AVND_EVT)':
susm.cc:1237:26: error: switch condition has type bool [-Werror=switch-bool]
switch (info->term_state) {
mds_dt_tipc.c: In function 'mdtm_tipc_init':
mds_dt_tipc.c:245:28: error: comparison of constant '2' with boolean expression is always false [-Werror=bool-compare]
if (mds_use_network_order == NCSCC_RC_FAILURE) {
plms_hsm.c: In function 'hsm_discover_and_dispatch':
plms_hsm.c:685:20: error: unused variable 'my_entity_path' [-Werror=unused-variable]
SaHpiEntityPathT my_entity_path;
plms_hsm.c:684:20: error: unused variable 'hpirc' [-Werror=unused-variable]
SaErrorT hpirc = SA_OK;
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.netopensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/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.
Related
Tickets:
#1340Tickets: tickets
Ticket [#1341] was created for the IMM problem. The AMF, MDS and PLM problems will be covered by this ticket.
Related
Tickets:
#1341changeset: 6530:ee74d1846cad
branch: opensaf-4.5.x
parent: 6525:32079e2039d2
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: amf: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6531:a9bc1dbb08b9
branch: opensaf-4.5.x
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: mds: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6532:b9305fd1a863
branch: opensaf-4.5.x
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: plm: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6533:ccccaf78d5e6
branch: opensaf-4.6.x
parent: 6528:ae390469410a
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: amf: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6534:8a9393544c35
branch: opensaf-4.6.x
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: mds: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6535:445df98a9bcf
branch: opensaf-4.6.x
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: plm: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6536:aefa3b108e0b
parent: 6529:b02b84711237
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: amf: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6537:c58ed4cae121
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: mds: Fix GCC 5.1.0 compiler warning [#1340]
changeset: 6538:199094d11ede
tag: tip
user: Anders Widell an..@ericsson.com
date: Fri May 08 12:33:00 2015 +0200
summary: plm: Fix GCC 5.1.0 compiler warning [#1340]
[staging:ee74d1]
[staging:a9bc1d]
[staging:b9305f]
[staging:ccccaf]
[staging:8a9393]
[staging:445df9]
[staging:aefa3b]
[staging:c58ed4]
[staging:199094]
Related
Tickets:
#1340Commit: [199094]
Commit: [445df9]
Commit: [8a9393]
Commit: [a9bc1d]
Commit: [aefa3b]
Commit: [b9305f]
Commit: [c58ed4]
Commit: [ccccaf]
Commit: [ee74d1]