Hi,
the line
if (abs(rfn - m_cur_rfn) > RFN_THRESHOLD) {
in your recent osmo-pcu patch breaks the package builds (on ubuntu 16.10 x86_64 as well as
i586).
1275a3f91a744e011b0dba82b09124d249c7abb5 / I74f00c11e5739d49f370ce6c357149e81d9aa759
I guess you should cast the uint32_t to e.g. long int explicitly to avoid the overloading
ambiguity.
abs((long int)(...))
It puzzles me why our gerrit build job did not run into this ambiguity though.
My own build on my laptop doesn't even print a warning for this line.
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/o…
[ 110s] bts.cpp: In member function 'uint32_t BTS::rfn_to_fn(uint32_t)':
[ 110s] bts.cpp:553:25: error: call of overloaded 'abs(uint32_t)' is ambiguous
[ 110s] if (abs(rfn - m_cur_rfn) > RFN_THRESHOLD) {
[ 110s] ^
[ 110s] In file included from /usr/include/c++/6/cstdlib:75:0,
[ 110s] from /usr/include/c++/6/stdlib.h:36,
[ 110s] from /usr/include/osmocom/core/linuxrbtree.h:97,
[ 110s] from /usr/include/osmocom/core/timer.h:35,
[ 110s] from ./bts.h:29,
[ 110s] from bts.cpp:21:
[ 110s] /usr/include/stdlib.h:735:12: note: candidate: int abs(int)
[ 110s] extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
[ 110s] ^~~
[ 110s] In file included from /usr/include/c++/6/stdlib.h:36:0,
[ 110s] from /usr/include/osmocom/core/linuxrbtree.h:97,
[ 110s] from /usr/include/osmocom/core/timer.h:35,
[ 110s] from ./bts.h:29,
[ 110s] from bts.cpp:21:
[ 110s] /usr/include/c++/6/cstdlib:185:3: note: candidate: __int128 std::abs(__int128)
[ 110s] abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
[ 110s] ^~~
[ 110s] /usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long
long int)
[ 110s] abs(long long __x) { return __builtin_llabs (__x); }
[ 110s] ^~~
[ 110s] /usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
[ 110s] abs(long __i) { return __builtin_labs(__i); }
[ 110s] ^~~
~N