我有一个简单的头文件,其中包含以下代码:
#include < stdio.h >
#include < pthread.h >
void init(struct prodcons * b);
void put(struct prodcons * b, int data);
int get(struct prodcons * b);
void * producer(void * data);
void * consumer(void * data);
当我编译终端时给出这四个警告:
producer_consumer.h:4:18: aviso: ‘struct prodcons’ declared inside parameter list [enabled by default]
producer_consumer.h:4:18: aviso: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
producer_consumer.h:6:17: aviso: ‘struct prodcons’ declared inside parameter list [enabled by default]
producer_consumer.h:8:16: aviso: ‘struct prodcons’ declared inside parameter list [enabled by default]