daokoder / dao-modules

Dao Standard Modules
http://daovm.net
12 stars 5 forks source link

Minor: implicit declaration of function isalnum #71

Open dumblob opened 9 years ago

dumblob commented 9 years ago

In dao_profiler.c, the function isalnum() is not declared.

cc -ggdb -O0 -DDEBUG -DDAO_WITH_NUMARRAY -DDAO_WITH_DECORATOR -DDAO_WITH_THREAD -DDAO_WITH_CONCURRENT -DDAO_WITH_RESTART -DTARGET_PLAT=\"linux\" -DLINUX=2 -DUNIX=1 -I../../kernel/ -I../auxlib/ -fPIC  -c dao_profiler.c -o DaoMake.Objs/dao_profiler.c.B721.o
dao_profiler.c: In function ‘DString_PartialAppend’:
dao_profiler.c:182:51: warning: implicit declaration of function ‘isalnum’ [-Wimplicit-function-declaration]
   DString_AppendBytes( self, other->chars, max-1-!isalnum(other->chars[max-2]) );
                                                   ^
dumblob commented 7 years ago

The same issue is in dao_clinker.c:

dao_clinker.c: In function ‘DaoCLoader_Load’:
dao_clinker.c:315:45: warning: implicit declaration of function ‘isalnum’ [-Wimplicit-function-declaration]
  while( pos && (lib->chars[pos-1] == '_' || isalnum( lib->chars[pos-1] )) ) pos -= 1;
                                             ^~~~~~~
dumblob commented 7 years ago

In dao_xml.c there are undeclared isspace() isalpha() and isalnum():

source/dao_xml.c: In function ‘DaoXmlParser_SkipWhiteSpaces’:
source/dao_xml.c:247:37: warning: implicit declaration of function ‘isspace’ [-Wimplicit-function-declaration]
  while( self->source < self->end && isspace( *self->source ) ) self->source += 1;
                                     ^~~~~~~
source/dao_xml.c: In function ‘DaoXmlParser_ParseIdentifier’:
source/dao_xml.c:262:7: warning: implicit declaration of function ‘isalpha’ [-Wimplicit-function-declaration]
  if( !isalpha( ch ) && ch != ':' && ch != '_' ) return 1;
       ^~~~~~~
source/dao_xml.c:263:9: warning: implicit declaration of function ‘isalnum’ [-Wimplicit-function-declaration]
  while( isalnum( ch ) || ch == ':' || ch == '_' || ch == '-' || ch == '.' ){
         ^~~~~~~
dumblob commented 7 years ago

Same in dao_profiler.c:

dao_profiler.c: In function ‘DString_PartialAppend’:
dao_profiler.c:182:51: warning: implicit declaration of function ‘isalnum’ [-Wimplicit-function-declaration]
   DString_AppendBytes( self, other->chars, max-1-!isalnum(other->chars[max-2]) );
                                                   ^~~~~~~