summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2021-06-19 14:00:44 -0600
committerGitHub <noreply@github.com>2021-06-19 14:00:44 -0600
commitb9cfab4a0c3b839b520735e4a183ca83d5e2f124 (patch)
tree03378ead6fe9cc3c0b1c61f3250c425f578d1204 /libs
parent829ba609de3aace7fd75b3a4f79fcb986f1f5596 (diff)
downloadbcm5719-ortega-b9cfab4a0c3b839b520735e4a183ca83d5e2f124.tar.gz
bcm5719-ortega-b9cfab4a0c3b839b520735e4a183ca83d5e2f124.zip
Build: Cleanup additional static analysis issues. (#231)
Diffstat (limited to 'libs')
-rw-r--r--libs/Compress/compress.c6
-rw-r--r--libs/Compress/decompress.c4
-rw-r--r--libs/NCSI/tests/tests.cpp4
3 files changed, 6 insertions, 8 deletions
diff --git a/libs/Compress/compress.c b/libs/Compress/compress.c
index 5142498..e1bfb22 100644
--- a/libs/Compress/compress.c
+++ b/libs/Compress/compress.c
@@ -234,7 +234,7 @@ int32_t compress(uint8_t *outBuffer, int32_t outBytes, const uint8_t *inBuffer,
st.parent[i] = NIL;
}
- int i, c, len, r = N - F, s = 0, lastMatchLen, codeBufPtr = 1;
+ int i, c, len, r = N - F, s = 0, codeBufPtr = 1;
uint8_t codeBuf[17], mask = 1;
codeBuf[0] = 0;
@@ -264,6 +264,8 @@ int32_t compress(uint8_t *outBuffer, int32_t outBytes, const uint8_t *inBuffer,
do
{
+ int lastMatchLen;
+
// matchLen may be spuriously long near the end of text.
if (st.matchLen >= len)
{
@@ -355,4 +357,4 @@ int32_t compress(uint8_t *outBuffer, int32_t outBytes, const uint8_t *inBuffer,
// *bytesWritten = bytesWritten_;
return bytesWritten_;
-} \ No newline at end of file
+}
diff --git a/libs/Compress/decompress.c b/libs/Compress/decompress.c
index 3fb3b02..2e4ec40 100644
--- a/libs/Compress/decompress.c
+++ b/libs/Compress/decompress.c
@@ -59,10 +59,6 @@ static struct
uint32_t cursor;
const uint8_t *inBuffer;
int32_t inBytes;
-
- uint8_t *outBuffer;
- int32_t outRemaining;
- int32_t outSent;
} g_DecompressorState;
static void state_init(const uint8_t *inBuffer, int32_t inBytes)
diff --git a/libs/NCSI/tests/tests.cpp b/libs/NCSI/tests/tests.cpp
index ed24a52..b4ec591 100644
--- a/libs/NCSI/tests/tests.cpp
+++ b/libs/NCSI/tests/tests.cpp
@@ -203,14 +203,14 @@ void send_packet(uint8_t *packet, uint32_t len)
gPacket = (uint32_t *)packet;
gPacketLen = len;
- uint32_t buffer[1024];
-
RegAPE_PERIBmcToNcRxStatus_t stat;
stat.r32 = APE_PERI.BmcToNcRxStatus.r32;
// stat.print();
if (stat.bits.New)
{
+ uint32_t buffer[1024];
+
int32_t bytes = stat.bits.PacketLength;
int i = 0;
while (bytes > 0)
OpenPOWER on IntegriCloud