summaryrefslogtreecommitdiff
path: root/noncore
authorerik <erik>2007-01-24 19:50:48 (UTC)
committer erik <erik>2007-01-24 19:50:48 (UTC)
commit035bbc5bf689839c8d8e7be37f347b0dd900fccf (patch) (unidiff)
treecd668db7b1fedbf6fa2d54fb312a90e6f157e82a /noncore
parenta017bf21dd89159052f2f7a3fbc043a24956c08c (diff)
downloadopie-035bbc5bf689839c8d8e7be37f347b0dd900fccf.zip
opie-035bbc5bf689839c8d8e7be37f347b0dd900fccf.tar.gz
opie-035bbc5bf689839c8d8e7be37f347b0dd900fccf.tar.bz2
Eac one the files in this commit had an instance where a code path is
never traversed because of conditionals operating on values that never change.
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/decompress.cpp7
-rw-r--r--noncore/games/solitaire/canvascard.cpp2
-rw-r--r--noncore/games/tetrix/ohighscoredlg.cpp9
3 files changed, 2 insertions, 16 deletions
diff --git a/noncore/apps/opie-reader/decompress.cpp b/noncore/apps/opie-reader/decompress.cpp
index 9bfec49..6034e01 100644
--- a/noncore/apps/opie-reader/decompress.cpp
+++ b/noncore/apps/opie-reader/decompress.cpp
@@ -12,8 +12,6 @@ size_t UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuffer, size_t bs
12 zstream.avail_out = bsize; 12 zstream.avail_out = bsize;
13 zstream.avail_in = reclen; 13 zstream.avail_in = reclen;
14 14
15 int keylen = 0;
16
17 zstream.zalloc = Z_NULL; 15 zstream.zalloc = Z_NULL;
18 zstream.zfree = Z_NULL; 16 zstream.zfree = Z_NULL;
19 zstream.opaque = Z_NULL; 17 zstream.opaque = Z_NULL;
@@ -23,11 +21,6 @@ size_t UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuffer, size_t bs
23 inflateInit(&zstream); 21 inflateInit(&zstream);
24 int err = 0; 22 int err = 0;
25 do { 23 do {
26 if ( zstream.avail_in == 0 && 0 < keylen ) {
27 zstream.next_in = compressedbuffer + keylen;
28 zstream.avail_in = reclen - keylen;
29 keylen = 0;
30 }
31 zstream.next_out = tgtbuffer; 24 zstream.next_out = tgtbuffer;
32 zstream.avail_out = bsize; 25 zstream.avail_out = bsize;
33 26
diff --git a/noncore/games/solitaire/canvascard.cpp b/noncore/games/solitaire/canvascard.cpp
index cd298ef..3ed9ea0 100644
--- a/noncore/games/solitaire/canvascard.cpp
+++ b/noncore/games/solitaire/canvascard.cpp
@@ -214,7 +214,7 @@ void CanvasCard::draw(QPainter &painter)
214 214
215 } 215 }
216 216
217 if (p != &painter) 217 if (p != &painter && unscaledCard)
218 { 218 {
219 p->end(); 219 p->end();
220 QPixmap *scaledCard = CreateScaledPixmap( unscaledCard, scaleX, scaleY ); 220 QPixmap *scaledCard = CreateScaledPixmap( unscaledCard, scaleX, scaleY );
diff --git a/noncore/games/tetrix/ohighscoredlg.cpp b/noncore/games/tetrix/ohighscoredlg.cpp
index 66f4917..504385f 100644
--- a/noncore/games/tetrix/ohighscoredlg.cpp
+++ b/noncore/games/tetrix/ohighscoredlg.cpp
@@ -174,7 +174,6 @@ void OHighscoreDialog::createHighscoreListView()
174 int pos = 10; 174 int pos = 10;
175 int points_ = 0; 175 int points_ = 0;
176 int level_ = 0; 176 int level_ = 0;
177 QListViewItem * Prev = 0;
178 177
179 for ( t_playerData * Run = hs_->playerData.first(); 178 for ( t_playerData * Run = hs_->playerData.first();
180 Run != 0; 179 Run != 0;
@@ -182,14 +181,8 @@ void OHighscoreDialog::createHighscoreListView()
182 { 181 {
183 QListViewItem *item; 182 QListViewItem *item;
184 183
185 if( Prev ) { 184 item = new QListViewItem( list );
186 // after previous
187 item = new QListViewItem( list, Prev );
188 Prev = item;
189 } else {
190 item = new QListViewItem( list );
191 185
192 }
193 item->setText( 0 , QString::number( pos ) ); //number 186 item->setText( 0 , QString::number( pos ) ); //number
194 item->setText( 1 , Run->sName ); //name 187 item->setText( 1 , Run->sName ); //name
195 if ( Run->points == -1 ) 188 if ( Run->points == -1 )