LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 02-10-2008, 11:53 PM   #1
nasim751
Member
 
Registered: Jan 2008
Posts: 40

Rep: Reputation: 15
Smile 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!
 
Old 02-11-2008, 01:04 AM   #2
fargie_s
LQ Newbie
 
Registered: May 2007
Posts: 7

Rep: Reputation: 0
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
 
Old 02-11-2008, 01:58 AM   #3
nasim751
Member
 
Registered: Jan 2008
Posts: 40

Original Poster
Rep: Reputation: 15
hello
thanks for idea. i over come problem.
regards!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: conflicting types for ‘check_state’ nasim751 Programming 3 02-01-2008 02:49 PM
warning: conflicting types for ‘check_state nasim751 Programming 2 01-30-2008 09:02 PM
error: conflicting types for `IPPROTO_IP' Anastasia Linux - Software 0 07-14-2005 07:12 AM
conflicting types error in parser.c snecklifter Programming 6 04-08-2005 07:59 PM


All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration