summaryrefslogtreecommitdiffstats
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
parent829ba609de3aace7fd75b3a4f79fcb986f1f5596 (diff)
downloadbcm5719-ortega-b9cfab4a0c3b839b520735e4a183ca83d5e2f124.tar.gz
bcm5719-ortega-b9cfab4a0c3b839b520735e4a183ca83d5e2f124.zip
Build: Cleanup additional static analysis issues. (#231)
-rw-r--r--.jenkins.groovy13
-rw-r--r--libs/Compress/compress.c6
-rw-r--r--libs/Compress/decompress.c4
-rw-r--r--libs/NCSI/tests/tests.cpp4
4 files changed, 14 insertions, 13 deletions
diff --git a/.jenkins.groovy b/.jenkins.groovy
index c662870..e5f784a 100644
--- a/.jenkins.groovy
+++ b/.jenkins.groovy
@@ -62,7 +62,8 @@ def build(nodeName, archive = false, archiveCab = false, analyze = true, testArc
cleanWs()
def url = ''
def refspec = '+refs/heads/*:refs/remotes/origin/*'
- try {
+ try
+ {
url = GITHUB_REPO_GIT_URL
}
catch (exc)
@@ -70,12 +71,14 @@ def build(nodeName, archive = false, archiveCab = false, analyze = true, testArc
url = 'git://github.com/meklort/bcm5719-fw.git'
}
def hash = ''
- try {
+ try
+ {
hash = GITHUB_BRANCH_HEAD_SHA
}
catch (exc)
{
- try {
+ try
+ {
hash = GITHUB_PR_HEAD_SHA
refspec = '+refs/pull/*:refs/remotes/origin/pr/*'
}
@@ -105,11 +108,11 @@ def build(nodeName, archive = false, archiveCab = false, analyze = true, testArc
]]
])
- def git_subject = sh (
+ def gitSubject = sh (
script: 'git show -s --format=%s',
returnStdout: true,
).trim()
- currentBuild.description = git_subject
+ currentBuild.description = gitSubject
}
stage('build')
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