当前位置: 技术问答>linux和unix
opensource voip 的程序裡要加入自己的 *.h *.c
来源: 互联网 发布时间:2016-05-16
本文导语: 在一個opensource voip 的程序裡要加入自己的 *.h *.c 已在Makefile.am加入了*.h *.c 也重新autogen.sh ,configure,make結果還是出錯 問題出在哪呢?thx if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../coreapi -I../oRTP/include -I../exosip -I../medi...
在一個opensource voip 的程序裡要加入自己的 *.h *.c
已在Makefile.am加入了*.h *.c
也重新autogen.sh ,configure,make結果還是出錯
問題出在哪呢?thx
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../coreapi -I../oRTP/include -I../exosip -I../mediastreamer2/include -I/usr/include -Wall -Wp,-D_FORTIFY_SOURCE=2 -Werror -DENABLE_TRACE -D_ORTP_SOURCE -DOSIP_MT -g -O2 -fno-strict-aliasing -MT hac_relay_net.o -MD -MP -MF ".deps/hac_relay_net.Tpo" -c -o hac_relay_net.o hac_relay_net.c;
then mv -f ".deps/hac_relay_net.Tpo" ".deps/hac_relay_net.Po"; else rm -f ".deps/hac_relay_net.Tpo"; exit 1; fi
cc1: warnings being treated as errors
hac_relay_net.c: In function 'Hac_Relay_Serv':
hac_relay_net.c:78: warning: pointer targets in passing argument 3 of 'accept' differ in signedness
hac_relay_net.c:18: warning: unused variable 'stream_len'
hac_relay_net.c:17: warning: unused variable 'val'
hac_relay_net.c: In function 'Open_Relay_Server':
hac_relay_net.c:118: warning: unused variable 'testfds'
hac_relay_net.c:118: warning: unused variable 'readfds'
hac_relay_net.c:117: warning: unused variable 'result'
hac_relay_net.c:116: warning: unused variable 'client_address'
hac_relay_net.c:114: warning: unused variable 'client_len'
hac_relay_net.c:113: warning: unused variable 'client_sockfd'
hac_relay_net.c: In function 'ProcessClientRequest':
hac_relay_net.c:143: warning: unused variable 'fd'
hac_relay_net.c:147: warning: ignoring return value of 'read', declared with attribute warn_unused_result
make: *** [hac_relay_net.o] Error 1
已在Makefile.am加入了*.h *.c
也重新autogen.sh ,configure,make結果還是出錯
問題出在哪呢?thx
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../coreapi -I../oRTP/include -I../exosip -I../mediastreamer2/include -I/usr/include -Wall -Wp,-D_FORTIFY_SOURCE=2 -Werror -DENABLE_TRACE -D_ORTP_SOURCE -DOSIP_MT -g -O2 -fno-strict-aliasing -MT hac_relay_net.o -MD -MP -MF ".deps/hac_relay_net.Tpo" -c -o hac_relay_net.o hac_relay_net.c;
then mv -f ".deps/hac_relay_net.Tpo" ".deps/hac_relay_net.Po"; else rm -f ".deps/hac_relay_net.Tpo"; exit 1; fi
cc1: warnings being treated as errors
hac_relay_net.c: In function 'Hac_Relay_Serv':
hac_relay_net.c:78: warning: pointer targets in passing argument 3 of 'accept' differ in signedness
hac_relay_net.c:18: warning: unused variable 'stream_len'
hac_relay_net.c:17: warning: unused variable 'val'
hac_relay_net.c: In function 'Open_Relay_Server':
hac_relay_net.c:118: warning: unused variable 'testfds'
hac_relay_net.c:118: warning: unused variable 'readfds'
hac_relay_net.c:117: warning: unused variable 'result'
hac_relay_net.c:116: warning: unused variable 'client_address'
hac_relay_net.c:114: warning: unused variable 'client_len'
hac_relay_net.c:113: warning: unused variable 'client_sockfd'
hac_relay_net.c: In function 'ProcessClientRequest':
hac_relay_net.c:143: warning: unused variable 'fd'
hac_relay_net.c:147: warning: ignoring return value of 'read', declared with attribute warn_unused_result
make: *** [hac_relay_net.o] Error 1
|
先把所有的warnings解决掉。
warnings being treated as errors
感觉这句话的意思是,警告被升级为错误了,可能是太多了。我这样理解。所以,先解决掉所有警告信息。再看看错误。
warnings being treated as errors
感觉这句话的意思是,警告被升级为错误了,可能是太多了。我这样理解。所以,先解决掉所有警告信息。再看看错误。