# HG changeset patch # User Matti Hamalainen # Date 1349193148 -10800 # Node ID 6bf5220fa47eb8de5750a9af3de549a081139dff # Parent 0430f484641b2b0fc4c8a11b46ce8c2992b64022 Urgh .. use memset to silence some bogus GCC warnings about using potentially uninitialized values, while that will not actually be possible. In any case, it is annoying. diff -r 0430f484641b -r 6bf5220fa47e jloadjss.c --- a/jloadjss.c Tue Oct 02 18:51:16 2012 +0300 +++ b/jloadjss.c Tue Oct 02 18:52:28 2012 +0300 @@ -294,6 +294,7 @@ *ppModule = NULL; // Check the JSSMOD header + memset(&jssH, 0, sizeof(jssH)); JSGETBUF(&jssH, JSSMODHeader); if (memcmp(jssH.idMagic, "JM", 2) != 0) @@ -346,6 +347,7 @@ size_t bufSize; // Get header and check size + memset(&jssP, 0, sizeof(jssP)); JSGETBUF(&jssP, JSSMODPattern); bufSize = jssP.size; if (bufLeft < jssP.size) @@ -419,6 +421,7 @@ JSSExtInstrument *einst; int i; + memset(&jssE, 0, sizeof(jssE)); JSGETBUF(&jssE, JSSMODExtInstrument); if ((einst = jssAllocateExtInstrument()) == NULL) @@ -453,6 +456,7 @@ JSSMODInstrument jssI; JSSInstrument *inst; + memset(&jssI, 0, sizeof(jssI)); JSGETBUF(&jssI, JSSMODInstrument); if ((inst = jssAllocateInstrument()) == NULL)