ggambetta / libz80

An emulator of the Z80 processor (C library)
145 stars 32 forks source link

get rid of "implicit declaration of function is...()" warnings #8

Closed theStack closed 4 years ago

theStack commented 4 years ago

The functions isspace(), isupper(), is[x]digit() were declared implicitely (i.e. the header file was missing), leading to compiler warnings such as the following:

gcc -g -o mktables mktables.c
mktables.c: In function ‘printCall’:
mktables.c:215:9: warning: implicit declaration of function ‘isspace’ [-Wimplicit-function-declaration]
  while (isspace(*p) && (*p))
         ^

By including the correct header "ctype.h", the warnings are gone.

ggambetta commented 4 years ago

Thanks for doing this, @theStack!