Mail Archives: djgpp/1999/01/14/21:20:31
From: | "Tim Hoskins" <hoskinst AT cadvision DOT com>
|
Subject: | What do these warnings mean and how can I fix them?
|
Newsgroups: | comp.os.msdos.djgpp
|
Message-ID: | <01be402b$6c7486e0$0100007f@tim-hoskins>
|
X-Newsreader: | Microsoft Internet News 4.70.1155
|
NNTP-Posting-Host: | 209.91.112.208
|
X-NNTP-Posting-Host: | 209.91.112.208
|
Date: | 14 Jan 1999 19:05:48 -0700
|
X-Trace: | 14 Jan 1999 19:05:48 -0700, 209.91.112.208
|
Organization: | CADVision Development Corporation (http://www.cadvision.com/)
|
Lines: | 58
|
X-NNTP-Posting-Host: | 204.50.1.43
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
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 <stdio.h>
#include <dos.h>
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
<hoskinst AT cadvision DOT com>
- Raw text -