[Linux-HA] heartbeat-2.0.2 build error on SuSE 10.0: join_dc.c:288: warning: comparisons like X<=Y<=Z do not have their mathematical meaning

Xun Sun xun.sun.cn at gmail.com
Sun Oct 23 20:25:15 MDT 2005


Hi Bernhard,

On 10/23/05, Bernhard Erdmann <be at berdmann.de> wrote:
> Hi,
>
> compiling heartbeat-2.0.2 on SuSE 10.0 yields:
>
> gmake[2]: Entering directory `/usr/local/src/heartbeat-2.0.2/crm/crmd'
> if gcc -DHAVE_CONFIG_H -I. -I. -I../../linux-ha -I../../include
> -I../../include -I../../include -I../../libltdl   -I../../libltdl
> -I../../linux-ha  -I../../linux-ha -I../..           -I../..
> -DLIBNET_LIL_ENDIAN -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD
> -DHAVE_NET_ETHERNET_H  -I/opt/gnome/include/glib-2.0
> -I/opt/gnome/lib/glib-2.0/include   -I/usr/include/libxml2 `xml2-config
> --cflags` -DHA_VARLIBDIR='"/var/lib/heartbeat/lib"' -g -O2  -Wall
> -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align
> -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2
> -Wformat-security -Wformat-nonliteral -Wno-long-long
> -Wno-strict-aliasing -Werror  -ggdb3 -funsigned-char -MT crmd-join_dc.o
> -MD -MP -MF ".deps/crmd-join_dc.Tpo" -c -o crmd-join_dc.o `test -f
> 'join_dc.c' || echo './'`join_dc.c; \
> then mv -f ".deps/crmd-join_dc.Tpo" ".deps/crmd-join_dc.Po"; else rm -f
> ".deps/crmd-join_dc.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> join_dc.c: In function 'finalize_sync_callback':
> join_dc.c:288: warning: comparisons like X<=Y<=Z do not have their
> mathematical meaning
> gmake[2]: *** [crmd-join_dc.o] Error 1
> gmake[2]: Leaving directory `/usr/local/src/heartbeat-2.0.2/crm/crmd'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/usr/local/src/heartbeat-2.0.2/crm'
> make: *** [all-recursive] Error 1
>

Could you please try this change (which is in our CVS head now, said
to fix compiling problem on Fedora Core 4) on your
/usr/local/src//heartbeat-2.0.2/crm/crmd/join_dc.c, and see if it
works?

--- join_dc.c.orig      2005-10-16 07:02:42.000000000 +0800
+++ join_dc.c   2005-10-16 07:02:56.000000000 +0800
@@ -285,7 +285,7 @@
        CRM_DEV_ASSERT(cib_not_master != rc);
        clear_bit_inplace(fsa_input_register, R_CIB_ASKED);
        if(rc != cib_ok) {
-               crm_log_maybe(rc==cib_old_data?LOG_WARNING:LOG_ERR,
+              crm_log_maybe((rc==cib_old_data?LOG_WARNING:LOG_ERR),
                              "Sync from %s resulted in an error: %s",
                              (char*)user_data, cib_error2string(rc));

>
> configure's options were:
>
> ./configure \
> --prefix=/opt/heartbeat \
> --sysconfdir=/etc \
> --localstatedir=/var/lib/heartbeat \
> --with-initdir=/etc/init.d \
> --with-snmp-name=net-snmp-devel
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
--
Thanks & regards
Xun Sun



More information about the Linux-HA mailing list