summaryrefslogtreecommitdiffhomepage
path: root/src/external
diff options
context:
space:
mode:
authorRay <[email protected]>2018-04-02 18:10:38 +0200
committerGitHub <[email protected]>2018-04-02 18:10:38 +0200
commit3e0de314244fa943d1944bb92901043279b0a03e (patch)
treeae36ed7cbb10904be2acaa798177206accb2f132 /src/external
parentbefd363966307068ed8a6709b6db6204a84a3531 (diff)
parent201007e426816eea145c6ed516165d8a10fc4301 (diff)
downloadraylib-3e0de314244fa943d1944bb92901043279b0a03e.tar.gz
raylib-3e0de314244fa943d1944bb92901043279b0a03e.zip
Merge pull request #504 from Martinfx/master
Fix potential bugs from static analysis
Diffstat (limited to 'src/external')
-rw-r--r--src/external/jar_xm.h18
-rw-r--r--src/external/rgif.h1
2 files changed, 2 insertions, 17 deletions
diff --git a/src/external/jar_xm.h b/src/external/jar_xm.h
index f7750664..9d4f5b5b 100644
--- a/src/external/jar_xm.h
+++ b/src/external/jar_xm.h
@@ -855,8 +855,6 @@ size_t jar_xm_get_memory_needed_for_context(const char* moddata, size_t moddata_
uint16_t num_instruments;
/* Read the module header */
-
- num_channels = READ_U16(offset + 8);
num_channels = READ_U16(offset + 8);
num_patterns = READ_U16(offset + 10);
@@ -2561,28 +2559,22 @@ uint64_t jar_xm_get_remaining_samples(jar_xm_context_t* ctx)
uint64_t total = 0;
uint8_t currentLoopCount = jar_xm_get_loop_count(ctx);
jar_xm_set_max_loop_count(ctx, 0);
-
+
while(jar_xm_get_loop_count(ctx) == currentLoopCount)
{
total += ctx->remaining_samples_in_tick;
ctx->remaining_samples_in_tick = 0;
jar_xm_tick(ctx);
}
-
+
ctx->loop_count = currentLoopCount;
return total;
}
-
-
-
-
//--------------------------------------------
//FILE LOADER - TODO - NEEDS TO BE CLEANED UP
//--------------------------------------------
-
-
#undef DEBUG
#define DEBUG(...) do { \
fprintf(stderr, __VA_ARGS__); \
@@ -2668,13 +2660,7 @@ int jar_xm_create_context_from_file(jar_xm_context_t** ctx, uint32_t rate, const
return 0;
}
-
-
-
#endif//end of JAR_XM_IMPLEMENTATION
//-------------------------------------------------------------------------------
-
-
-
#endif//end of INCLUDE_JAR_XM_H
diff --git a/src/external/rgif.h b/src/external/rgif.h
index 8a32ef61..44ee13b3 100644
--- a/src/external/rgif.h
+++ b/src/external/rgif.h
@@ -911,7 +911,6 @@ static void GifWriteLzwImage(FILE *f, unsigned char *image, unsigned int left, u
GifWriteCode(f, &stat, clearCode, codeSize); // clear tree
memset(codetree, 0, sizeof(GifLzwNode)*4096);
- curCode = -1;
codeSize = minCodeSize + 1;
maxCode = clearCode + 1;
}