From: wjae AT plex DOT nl (Wiel Aerts) Newsgroups: comp.os.msdos.djgpp Subject: Re: What do these warnings mean and how can I fix them? Date: Fri, 15 Jan 1999 18:53:05 GMT Organization: Plex -- a public access Internet provider Lines: 70 Message-ID: <369f8d6f.1312510@news.plex.nl> References: <01be402b$6c7486e0$0100007f AT tim-hoskins> NNTP-Posting-Host: 194.229.212.136 X-Newsreader: Forte Free Agent 1.11/32.235 X-Posted-through: WHIRLwind.plex.nl for unknown AT dialin-1c32 DOT plex DOT nl (WHIRLwind.plex.nl!unknown AT dialin-1c32 DOT plex DOT nl) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 14 Jan 1999 19:05:48 -0700, "Tim Hoskins" wrote: >What do these warnings mean and how can I fix them? > >Here's the errors in comilation ( DJGPP ): > >C:\Programs>gcc b.c -o b.exe >b.c: In function `main': >b.c:20: warning: assignment makes pointer from integer without a cast >b.c:21: warning: assignment makes pointer from integer without a cast >b.c:25: warning: assignment makes pointer from integer without a cast >b.c:26: warning: assignment makes pointer from integer without a cast > >C:\Programs> > >And now the source: > >// b.c - a program to list the LFN version of a dos file name. >// specify the directory to list file from as a command line argument. > >#include >#include > >struct find_t ffblk; > >int main( int argc, char *argv[] ) >{ > > char *realname, *newname, *endofstring; > int lenofstr, lenoffn; > > if ( argc < 2 ) > { > printf("\n\nError, no parse directory."); > exit(1); > } > > if ( _dos_findfirst("*.*", _A_NORMAL, &ffblk) == 0 ) > { > realname = _truename(ffblk.name, (char *)0); > newname = strrchr(realname,92) + sizeof(char); > printf("%s\n", newname); > while ( _dos_findnext(&ffblk) == 0 ) > { > realname = _truename(ffblk.name, (char *)0); > newname = strrchr(realname,92) + sizeof(char); > printf("%s\n", newname); > } > } > else > printf("no files\n"); > > return 0; >} > >// end of b.c > >Thanks, >Tim Hoskins > If you compile with: gcc -Wall .... you will see that the proper prototype of _truename is missing (in that case the compiler will assume int _truename(...)). You should include (see in info). Than the warning is gone. For the other function: Greetings, W. Aerts