From 604eb1e89b4ab0e11bba5deb0609b4e09792e9f2 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 29 Aug 2000 22:49:07 +0000 Subject: [PATCH] fixed Tornado II GNU warning --- src/libCom/osi/os/default/osiWireFormat.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libCom/osi/os/default/osiWireFormat.h b/src/libCom/osi/os/default/osiWireFormat.h index edef0139a..b218f0ecc 100644 --- a/src/libCom/osi/os/default/osiWireFormat.h +++ b/src/libCom/osi/os/default/osiWireFormat.h @@ -26,13 +26,14 @@ // network byte stream. // +static const unsigned osiWireFormatEndianTest = 1u; +static const char * const pOSIWireFormatEndianTest = reinterpret_cast < const char * > ( &osiWireFormatEndianTest ); + // this endian test should vanish during optimization // and therefore be executed only at compile time inline bool osiLittleEndian () { - static const unsigned endianTest = 1u; - static const char * const pEndianTest = reinterpret_cast < const char * > ( &endianTest ); - if ( *pEndianTest ) { + if ( *pOSIWireFormatEndianTest ) { return true; } else {