oetiker / mrtg

MRTG - Multi Router Traffic Grapher
http://www.mrtg.org
243 stars 60 forks source link

Warning: implicit declaration of function ‘strncasecmp’ #99

Closed youpong closed 1 year ago

youpong commented 1 year ago

Description

The following warnings are shown when building mrtg.

gcc  -std=c18 -Wall -Wpointer-arith -Wcast-align -Wmissing-declarations -Wnested-externs -Winline -W -DHAVE_CONFIG_H -c ./src/rateup.c -o bin/rateup.o
./src/rateup.c: In function ‘main’:
./src/rateup.c:1838:22: warning: implicit declaration of function ‘strncasecmp’; did you mean ‘strncmp’? [-Wimplicit-function-declaration]
 1838 |   if ((argc > 1) && (strncasecmp (argv[1], "-F", 2) == 0))
      |                      ^~~~~~~~~~~
      |                      strncmp
./src/rateup.c:1838:22: warning: nested extern declaration of ‘strncasecmp’ [-Wnested-externs]

How to reproduce

  1. $ ./configure CFLAGS=-std=c18
  2. $ make