2022-01-21 16:30:50

by kernel test robot

[permalink] [raw]
Subject: [ammarfaizi2-block:google/android/kernel/common/android13-5.10 9989/9999] main.c:118:5: warning: no previous prototype for 'eprintf'

tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android13-5.10
head: 976a28295a01db618903406bd67cae53a4c29832
commit: 44b9bfcd4cdbc57889a0fecf79a6d30237f21bed [9989/9999] FROMGIT: tools/resolve_btfids: Build with host flags
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220119/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/44b9bfcd4cdbc57889a0fecf79a6d30237f21bed
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android13-5.10
git checkout 44b9bfcd4cdbc57889a0fecf79a6d30237f21bed
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> main.c:118:5: warning: no previous prototype for 'eprintf' [-Wmissing-prototypes]
118 | int eprintf(int level, int var, const char *fmt, ...)
| ^~~~~~~
main.c: In function 'symbols_collect':
main.c:407:7: warning: unused variable 'err' [-Wunused-variable]
407 | int err = -1;
| ^~~
main.c:404:9: warning: unused variable 'tmp' [-Wunused-variable]
404 | char *tmp, *prefix;
| ^~~
main.c: In function 'eprintf':
>> main.c:128:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
128 | return ret;
| ^~~

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


2022-01-21 16:30:50

by Andrii Nakryiko

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:google/android/kernel/common/android13-5.10 9989/9999] main.c:118:5: warning: no previous prototype for 'eprintf'

On Tue, Jan 18, 2022 at 8:33 PM kernel test robot <[email protected]> wrote:
>
> tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android13-5.10
> head: 976a28295a01db618903406bd67cae53a4c29832
> commit: 44b9bfcd4cdbc57889a0fecf79a6d30237f21bed [9989/9999] FROMGIT: tools/resolve_btfids: Build with host flags
> config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220119/[email protected]/config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
> # https://github.com/ammarfaizi2/linux-block/commit/44b9bfcd4cdbc57889a0fecf79a6d30237f21bed
> git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
> git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android13-5.10
> git checkout 44b9bfcd4cdbc57889a0fecf79a6d30237f21bed
> # save the config file to linux build tree
> mkdir build_dir
> make W=1 O=build_dir ARCH=x86_64 prepare
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <[email protected]>
>
> All warnings (new ones prefixed by >>):
>
> >> main.c:118:5: warning: no previous prototype for 'eprintf' [-Wmissing-prototypes]
> 118 | int eprintf(int level, int var, const char *fmt, ...)
> | ^~~~~~~
> main.c: In function 'symbols_collect':
> main.c:407:7: warning: unused variable 'err' [-Wunused-variable]
> 407 | int err = -1;
> | ^~~
> main.c:404:9: warning: unused variable 'tmp' [-Wunused-variable]
> 404 | char *tmp, *prefix;
> | ^~~
> main.c: In function 'eprintf':
> >> main.c:128:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 128 | return ret;
> | ^~~
>

All this has been addressed 9 months (!) ago by:

e27bfefb21f2 ("tools/resolve_btfids: Fix warnings")


> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/[email protected]