From e028f5b09a258a9b258b589027349903786655dc Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 13 Mar 2000 15:58:12 +0000 Subject: [PATCH] fixed gnu warning --- src/ca/access.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ca/access.cpp b/src/ca/access.cpp index 1aa799ae0..8b7567c72 100644 --- a/src/ca/access.cpp +++ b/src/ca/access.cpp @@ -34,8 +34,18 @@ #include "iocinf.h" -static caHdr nullmsg; +const static caHdr nullmsg = { + 0,0,0,0,0,0 +}; +const static char nullBuff[32] = { + 0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0, + 0,0 +}; + static threadPrivateId caClientContextId; + threadPrivateId cacRecursionLock; #define TYPENOTINUSE (-2) @@ -127,13 +137,11 @@ LOCAL int cac_push_tcp_msg (tcpiiu *piiu, const caHdr *pmsg, const void *pext) * if present (this avoids messages from purify) */ { - /* static variables are initialized to zero */ - const static char nullBuff[32] = { 0 }; unsigned long n; n = extsize-actualextsize; if (n) { - assert (n<=sizeof(nullBuff)); + assert ( n <= sizeof (nullBuff) ); bytesSent = cacRingBufferWrite ( &piiu->send, nullBuff, n ); if ( bytesSent != n ) { return ECA_DISCONNCHID;