aperf.c:58:9: warning: 'ftime' is deprecated: Use gettimeofday or clock_gettime instead
kernel test robot
build botHi Ricardo,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y head: 387078f9030cf336cd9fef521540db75b61615e0 commit: b1619f0307762526949f95c878119ca80e32149d [7168/9999] selftests/intel_pstate: fix build for ARCH=x86_64 compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b1619f0307762526949f95c878119ca80e32149d
git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch --no-tags stable linux-5.10.y
git checkout b1619f0307762526949f95c878119ca80e32149d
make O=/tmp/kselftest headers
make O=/tmp/kselftest -C tools/testing/selftests
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
aperf.c: In function 'main':
>> aperf.c:58:9: warning: 'ftime' is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
58 | ftime(&before);
| ^~~~~
In file included from aperf.c:9:
/usr/include/x86_64-linux-gnu/sys/timeb.h:29:12: note: declared here
29 | extern int ftime (struct timeb *__timebuf)
| ^~~~~
aperf.c:67:9: warning: 'ftime' is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
67 | ftime(&after);
| ^~~~~ In file included from aperf.c:9:
/usr/include/x86_64-linux-gnu/sys/timeb.h:29:12: note: declared here
29 | extern int ftime (struct timeb *__timebuf)
| ^~~~~
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests