CID 1399751: Unused value in fastlz2_compress().

Closes #4341
---
 cpukit/libdl/fastlz.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/cpukit/libdl/fastlz.c b/cpukit/libdl/fastlz.c
index 3c9d6f6..7257c98 100644
--- a/cpukit/libdl/fastlz.c
+++ b/cpukit/libdl/fastlz.c
@@ -219,7 +219,15 @@ static FASTLZ_INLINE int FASTLZ_COMPRESSOR(const void* 
input, int length, void*
     if(ip[0] == ip[-1] && FASTLZ_READU16(ip-1)==FASTLZ_READU16(ip+1))
     {
       distance = 1;
-      ip += 3;
+      #ifndef __rtems__
+        /*
+         * ip is assigned a value here, but is immediately assigned another
+         * value when it goes to match (line 269). The value that was initially
+         * assigned is not used, and this results in a Coverity issue. See CID
+         * 1399751
+         */
+        ip += 3;
+      #endif
       ref = anchor - 1 + 3;
       goto match;
     }
-- 
1.8.3.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to