Univention Bugzilla – Bug 38696
Logic errors: comparison of unsigned expression
Last modified: 2016-07-21 15:16:06 CEST
Created attachment 6957 [details] Fix comparison of unsigned expression # make CC=clang -C src clang -g -Wall -Werror -D_FILE_OFFSET_BITS=64 -I/usr/include/db3 -DWITH_DB3 -c -o cache_lowlevel.o cache_lowlevel.c cache_lowlevel.c:270:44: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] hex_dump(UV_DEBUG_ERROR, data, pos-1000 < 0 ? 0 : pos-1000, pos-1000 < 0 ? pos : 1000); ~~~~~~~~ ^ ~ cache_lowlevel.c:270:73: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] hex_dump(UV_DEBUG_ERROR, data, pos-1000 < 0 ? 0 : pos-1000, pos-1000 < 0 ? pos : 1000); ~~~~~~~~ ^ ~
> univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "last 100 bytes of previous entry:"); >- hex_dump(UV_DEBUG_ERROR, data, pos-1000 < 0 ? 0 : pos-1000, pos-1000 < 0 ? pos : 1000); Also note: 100 in the message != 1000 in the dump
r69895 | Bug #38696 UDL: Fix comparison of signed values Package: univention-directory-listener Version: 10.0.0-11.315.201606071717 Branch: ucs_4.1-0 Scope: errata4.1-2 r69910 | Bug #22383,Bug #30227,Bug #30263,Bug #34324,Bug #34507,Bug #34738,Bug #3490,Bug #38696,Bug #39509,Bug #40600,Bug #41261: UDL YAML univention-directory-listener.yaml
Code review: Ok Advisory: Ok
<http://errata.software-univention.de/ucs/4.1/215.html>