files: Fix compilation errors
1: Signed underflow
criu/files-reg.c: In function ‘open_path’:
criu/files-reg.c:1299:14: error: iteration 2147483647
invokes undefined behavior [-Werror=aggressive-loop-optimizations]
while (count--) {
~~~~~^~
2: Uninitialized variable
criu/files-reg.c: In function ‘make_parent_dirs_if_need’:
criu/files-reg.c:1354:13: warning: ‘count’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
P.S. arch linux 4.7.5-1. gcc (GCC) 6.3.1 20170109
Signed-off-by:
Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
Showing
Please
register
or
sign in
to comment