aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Turner2010-06-08 20:29:33 +0000
committerDavid Turner2010-06-08 20:29:33 +0000
commit641ffa5ee3b8036c1a03fc557d0f9705c824eb3e (patch)
treecb96562bec692f5c87a869e7e1e48cfbe6da8bb0
parent73010518b22c8c24cf09b07bbd6c17655aa1d331 (diff)
downloadscummvm-rg350-641ffa5ee3b8036c1a03fc557d0f9705c824eb3e.tar.gz
scummvm-rg350-641ffa5ee3b8036c1a03fc557d0f9705c824eb3e.tar.bz2
scummvm-rg350-641ffa5ee3b8036c1a03fc557d0f9705c824eb3e.zip
Modification to remove false positive "Possible divide by zero" warnings given by cppcheck-1.43.
These are incorrect as '/' operator has precedence over >>, but this does improve readability anyway. This bug in cppcheck has already been corrected: http://sourceforge.net/apps/trac/cppcheck/ticket/1714 svn-id: r49517
-rw-r--r--engines/scumm/sound.cpp2
-rw-r--r--sound/softsynth/sid.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 65c50aff14..a845f623c2 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1789,7 +1789,7 @@ static void convertADResource(ResourceManager *res, const GameSettings& game, in
// There is a constant delay of ppqn/3 before the music starts.
if (ppqn / 3 >= 128)
- *ptr++ = (ppqn / 3 >> 7) | 0x80;
+ *ptr++ = ((ppqn / 3) >> 7) | 0x80;
*ptr++ = ppqn / 3 & 0x7f;
// Now copy the actual music data
diff --git a/sound/softsynth/sid.cpp b/sound/softsynth/sid.cpp
index e0dfd2efc0..d600ac28f5 100644
--- a/sound/softsynth/sid.cpp
+++ b/sound/softsynth/sid.cpp
@@ -506,7 +506,7 @@ Filter::Filter() {
+ sizeof(f0_points_6581)/sizeof(*f0_points_6581) - 1,
PointPlotter<sound_sample>(f0_6581), 1.0);
- mixer_DC = -0xfff*0xff/18 >> 7;
+ mixer_DC = (-0xfff*0xff/18) >> 7;
f0 = f0_6581;
f0_points = f0_points_6581;