Compile FAQ

1

warning: incompatible implicit declaration of built-in function'memset' [enabled by default]
Reason: memset is called to initialize the data in the memory, but it is not specified where the memset function comes from.
Solution: add #include <string.h> to the file header

2

warning: assignment from incompatible pointer type [enabled by default]
Reason: The pointer type is inconsistent.
Solution: Cast the pointer type to make it consistent

3

warning: comparison between pointer and integer [enabled by default]
Reason : The comparison between pointer and integer , the data type of comparison is inconsistent;
Solution: *clientRTCPPortNum = (streamingMode == RAW_UDP? 0: p1 + 1);
streamingMode itself is a pointer, missing
Dropped one * and modified it to: *clientRTCPPortNum = (*streamingMode == RAW_UDP? 0: p1 + 1); The warning was resolved.

4

warning: implicit declaration of function'close' [-Wimplicit-function-declaration]
Solution: add #include <unistd.h> to the file header

5

warning: implicit declaration of function'pthread_detach' [-Wimplicit-function-declaration]
Solution: add #include <pthread.h> to the file header

6

Error: error: jump to label [-fpermissive]
Solution: The
reason is very simple, after goto, a newly defined variable appeared.
It can be solved by defining variables before goto.

Guess you like

Origin blog.csdn.net/u014470361/article/details/98589363