472,794 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 software developers and data experts.

statement not reached

Hi All

i am working to fix all warning messages in my c code.
i am getting "statement not reached" warning.How can i resolve it? please give me some tips to resolve this warning.

Thanks in advance.
Mar 24 '08 #1
2 6612
weaknessforcats
9,208 Expert Mod 8TB
You have code that is not logically reachable. LIke this:

Expand|Select|Wrap|Line Numbers
  1. if ( a == 2)
  2. {
  3.     //etc...
  4.     return;
  5. }
  6. else
  7. {
  8.      //etc...
  9.      return;
  10. }
  11. //etc...            //not reachable
  12. return;  
  13.  
You will simplyhave ot look where the compiler says there is unreachable code and see why there is no way to get there.
Mar 24 '08 #2
Thanks for the great help. i'll look in to my code to resolve the problem.
Mar 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jjliu | last post by:
Could someone point me out that why the following perl program only print 'title'. I expect the contents in h1, keywords and description to print out as well. thanks. JJL #!/usr/bin/Perl ...
7
by: Graham James Campbell CS2000 | last post by:
Having a nightmare problem with this and would appreciate any and all help. The situation is I want to move from a webform and format the user inputted text into some html I am storing in a...
5
by: muser | last post by:
I have the following problem do{ something; while(temp1, != '\n'); compiler error: syntax error !=.
18
by: deanbrown3d | last post by:
I mean, is this correct? try { Screen->Cursor = crHourglass; Do something bad return false; else return true; }
7
by: Sunny | last post by:
Hi, I can not understend completely the lock statement. Actally what is locked: 1. the part of the code between {...} or 2. the object in lock() In the docs is written: for 1: The lock...
9
by: maas | last post by:
Hello I have a problem when coding the statement stmt.execute("insert into Member values ("+mname+" ,"+mail+","+tel+")"); where mname, mail,tel are variables which the user inputs them and...
13
by: axr0284 | last post by:
Hi, I have a main function as follows: int main(void) { while(TRUE) { ... } return TRUE; } my question is since the return TRUE is never reached, can I remove
16
by: cmdolcet69 | last post by:
I have the below if statement, that should catch if any of the conditions are met.....however for some reasons if my boolDSIFlushGapReading = true and MuxClass.DSIValues.count =1 and my...
40
by: chhines | last post by:
I have a very long IIf statement. I think maybe I've reached the limit of how many choices you can have in the control source "Build" statement of a text box on a form. Really, the IIF statement is...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.