"unlikely" fails to compile with --with-debug on Ununtu
Bug #456084 reported by
Mark Atwood
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Trying to build from bzr revno: 608 on ubuntu jaunty on EC2 (ami-0d729464). Uses gcc version 4.3.3
When doing ./configure --with-debug && make
lots of compile failures regarding "unlikely()"
as an example:
memcached_fetch.c: In function ‘memcached_fetch’:
memcached_
memcached_fetch.c: In function ‘memcached_
memcached_
Changed in libmemcached: | |
status: | New → Incomplete |
Changed in libmemcached: | |
status: | Incomplete → Invalid |
To post a comment you must log in.
Mark Atwood wrote: fetch.c: 11: error: conversion to ‘long int’ from ‘uint32_t’ may change the sign of the result [-Wsign-conversion] fetch_result’ : fetch.c: 48: error: conversion to ‘long int’ from ‘uint32_t’ may change the sign of the result [-Wsign-conversion]
> Public bug reported:
>
> Trying to build from bzr revno: 608 on ubuntu jaunty on EC2 (ami-
> 0d729464). Uses gcc version 4.3.3
>
> When doing ./configure --with-debug && make
>
> lots of compile failures regarding "unlikely()"
>
> as an example:
>
> memcached_fetch.c: In function ‘memcached_fetch’:
> memcached_
> memcached_fetch.c: In function ‘memcached_
> memcached_
This is actually not related to unlikey() at all. This is releated to
the AND operator (&) being applied to a uint32_t and an enum.
One can work around this by doing a cast to uint32_t on the enum value.