diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-10-10 08:58:18 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-10-10 08:58:18 -0700 |
commit | ccb5bb34d73f34461abe180f36b3c2b9e45cc933 (patch) | |
tree | 74342a3dc5291fa48cff9a792df8c6791833dd46 /src/map/mio/mioUtils.c | |
parent | ca9eca3b227ae3f8a60038ba9c295f5383a6826d (diff) | |
download | abc-ccb5bb34d73f34461abe180f36b3c2b9e45cc933.tar.gz abc-ccb5bb34d73f34461abe180f36b3c2b9e45cc933.tar.bz2 abc-ccb5bb34d73f34461abe180f36b3c2b9e45cc933.zip |
Suggested patch for type-punned warnings
Diffstat (limited to 'src/map/mio/mioUtils.c')
-rw-r--r-- | src/map/mio/mioUtils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c index 4241e7b4..57c274ee 100644 --- a/src/map/mio/mioUtils.c +++ b/src/map/mio/mioUtils.c @@ -512,10 +512,13 @@ word Mio_DeriveTruthTable6( Mio_Gate_t * pGate ) { 0xFFFF0000, 0xFFFF0000 }, { 0x00000000, 0xFFFFFFFF } }; - unsigned uTruthRes[2]; + union { + unsigned u[2]; + word w; + } uTruthRes; assert( pGate->nInputs <= 6 ); - Mio_DeriveTruthTable( pGate, uTruths6, pGate->nInputs, 6, uTruthRes ); - return *((word *)uTruthRes); + Mio_DeriveTruthTable( pGate, uTruths6, pGate->nInputs, 6, uTruthRes.u ); + return uTruthRes.w; } #if 0 |