[zeromq-dev] Error: comparison between signed and unsigned integer expressions

Pieter Hintjens ph at imatix.com
Thu Jul 5 12:02:33 CEST 2012


Hi Sharon,

OK, so socklen_t is definitely signed on your platform. If you would
make an issue in Jira, I'll make a patch for all current 0MQ versions.

Thanks
Pieter

On Thu, Jul 5, 2012 at 6:56 PM, Sharon Ben-Asher
<Sharon.Ben-Asher at avg.com> wrote:
> I solved the problem by converting the sizeof to int like this
>
> if (sa->sa_family == AF_INET && sa_len >= (int)sizeof (address.ipv4)) {
>
> I guess it’s a platform specific issue? Anyway, it is needed to compile the
> lib for ARM.
>
>
>
> From: Sharon Ben-Asher
> Sent: Thursday, July 05, 2012 9:52 AM
> To: 'zeromq-dev at lists.zeromq.org'
> Subject: Error: comparison between signed and unsigned integer expressions
>
>
>
> Hello,
>
>
>
> I am trying to build ZeroMQ build for Android.  I have a VM with Ubuntu
> 12.04 on x86_64, NDK is R8, configured as standalone toolchain, exactly like
> your websites instructs.
>
> I downloaded the 3.x git project (git clone
> https://github.com/zeromq/zeromq3-x.git)
>
> configure was ok.
>
> When I do make, I get the following errors:
>
>
>
> cc1plus: warnings being treated as errors
>
> tcp_address.cpp: In constructor 'zmq::tcp_address_t::tcp_address_t(const
> sockaddr*, socklen_t)':
>
> tcp_address.cpp:374: error: comparison between signed and unsigned integer
> expressions
>
> tcp_address.cpp:377: error: comparison between signed and unsigned integer
> expressions
>
> tcp_address.cpp: In member function 'const bool
> zmq::tcp_address_mask_t::match_address(const sockaddr*, socklen_t) const':
>
> tcp_address.cpp:580: error: comparison between signed and unsigned integer
> expressions
>
> make[2]: *** [libzmq_la-tcp_address.lo] Error 1
>
> make[2]: Leaving directory `/home/sharon/zeromq3-x/src'
>
> make[1]: *** [all] Error 2
>
> make[1]: Leaving directory `/home/sharon/zeromq3-x/src'
>
> make: *** [all-recursive] Error 1
>
>
>
> Attached is the full make output  + configure.log
>
>
>
> Thanks,
>
>
>
> Sharon
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list