# HG changeset patch # User asl # Date 1096963243 0 # Node ID fb1561fe12e7ba5d41f57ec7089d998489820b5f # Parent bb357fe047ed5f42c4c34eaa316ab2714e641c47 * src/romfs.c (romfs_mount): Avoid a compiler warning about punned types. diff --git a/packages/fs/rom/current/ChangeLog b/packages/fs/rom/current/ChangeLog --- a/packages/fs/rom/current/ChangeLog +++ b/packages/fs/rom/current/ChangeLog @@ -1,3 +1,8 @@ +2004-10-04 Andrew Lunn + + * src/romfs.c (romfs_mount): Avoid a compiler warning about punned + types. + 2004-08-08 Bart Veer * cdl/romfs.cdl: generate both little-endian and big-endian image diff --git a/packages/fs/rom/current/src/romfs.c b/packages/fs/rom/current/src/romfs.c --- 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; }