www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/29/14:08:25

Message-Id: <1.5.4b13.32.19960329172409.0066ac94@oak-web.washington-ch.oh.us>
Mime-Version: 1.0
Date: Fri, 29 Mar 1996 12:24:09 -0500
To: djgpp AT delorie DOT com
From: Daniel Pierce <ab134 AT oak-web DOT washington-ch DOT oh DOT us>
Subject: lint for gjgpp?

Greetings...   I'm using gcc to port a large Turbo C 3.0 program and strings
keep getting lost on returns.  That is return(char *message) does not always
return what it should.

char *selector(int messagenumber)
{       .. scan database data[x] ..
        if (messagenumber == data[x].number) break;
        if (found == ok)
           return(data[x].message);
           else
           return("<not found>");
}

The passed messagenumber works ok, the correct message is found in the database,
but the function keeps returning with prior returned message most of the
time and sometimes with the correctly indexed message.  I have it printf the
message to be returned and it always selects the correct one but it keeps
returning wrong ones.

I figure I must have something screwed up someplace else and would like to
know if there is a lint for djgpp for dos?

    HELP!!!!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019