LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   conflicting types for check_state (https://www.linuxquestions.org/questions/programming-9/conflicting-types-for-check_state-620222/)

nasim751 02-10-2008 10:53 PM

conflicting types for check_state
 
hello,
i got one more warning. how you will deal this one...........

Code:

check_state(gp, c, rc)

void
check_state(struct descry_pack *gp, struct tcp_connection *con1,
        struct tcp_connection *con2)
{

warning: conflicting types for ‘check_state’
warning: previous implicit declaration of ‘check_state’ was here



regards!

fargie_s 02-11-2008 12:04 AM

If the function call is before it's code you need to declare it's prototype :

Code:

void
check_state(struct descry_pack *gp, struct tcp_connection *con1,
        struct tcp_connection *con2);

check_state(gp, c, rc)

void
check_state(struct descry_pack *gp, struct tcp_connection *con1,
        struct tcp_connection *con2)
{

You can also put the prototype in a header or put the code before the call :)

nasim751 02-11-2008 12:58 AM

hello
thanks for idea. i over come problem.
regards!


All times are GMT -5. The time now is 11:25 AM.