implicit declaration of function ‘sleep’

需要加入函数的申明

<built-in>: note: built-in ‘strncmp’ declared here
shmread.c:101:9: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
  101 |         sleep(1);
      |         ^~~~~
shmread.c:99:12: warning: implicit declaration of function ‘strncmp’ [-Wimplicit-function-declaration]
   99 |         if(strncmp(shared->text,"end",3)==0)
      |            ^~~~~~~
int strncmp ( const char * str1, const char * str2, size_t n );
unsigned int sleep (unsigned int seconds)

上一篇:元注解


下一篇:Java注解