From: henryk@ploetzli.ch Date: Tue, 8 Sep 2009 02:36:50 +0000 (+0000) Subject: Hopefully correct code for C's strict aliasing rules X-Git-Tag: v1.0.0~477 X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/45dcfac2cc8df0e60c05d4596f74c785347dce36 Hopefully correct code for C's strict aliasing rules --- diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 78ab8691..5377104e 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -249,8 +249,8 @@ void SendVersion(void) * symbol _bootphase1_version_pointer, perform slight sanity checks on the * pointer, then use it. */ - void *bootrom_version = *(void**)&_bootphase1_version_pointer; - if( bootrom_version < (void*)&_flash_start || bootrom_version >= (void*)&_flash_end ) { + char *bootrom_version = *(char**)&_bootphase1_version_pointer; + if( bootrom_version < &_flash_start || bootrom_version >= &_flash_end ) { DbpString("bootrom version information appears invalid"); } else { FormatVersionInformation(temp, sizeof(temp), "bootrom: ", bootrom_version);