Mercurial > ecos
diff packages/fs/rom/current/src/romfs.c @ 1787:fb1561fe12e7
* src/romfs.c (romfs_mount): Avoid a compiler warning about punned
types.
| author | asl |
|---|---|
| date | Tue, 05 Oct 2004 08:00:43 +0000 |
| parents | 89eafd905d8d |
| children | 04c9eb8c07e9 |
line wrap: on
line diff
--- a/packages/fs/rom/current/src/romfs.c +++ b/packages/fs/rom/current/src/romfs.c @@ -594,10 +594,12 @@ static int romfs_mount ( cyg_fstab_en if ( !mte->data ) { // If the image address was not in the MTE data word, if ( mte->devname && mte->devname[0] ) { - // And there's something in the 'hardware device' field, + char *addr; + // And there's something in the 'hardware device' field, // then read the address from there. - sscanf( mte->devname, "%p", (char**)&disk ); - } + sscanf( mte->devname, "%p", &addr ); + disk = (romfs_disk *) addr; + } } else { disk = (romfs_disk *)mte->data; }
