summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Palm2QImage.cpp
authorerik <erik>2007-01-29 21:53:48 (UTC)
committer erik <erik>2007-01-29 21:53:48 (UTC)
commit02ef45be75a3024df11365956e1cce6392d9103c (patch) (unidiff)
tree42fd5c909d67a473f57a607e01d32e01b3dd2511 /noncore/apps/opie-reader/Palm2QImage.cpp
parentb2c306a99b8dc82c981390f02db859149fac8cf0 (diff)
downloadopie-02ef45be75a3024df11365956e1cce6392d9103c.zip
opie-02ef45be75a3024df11365956e1cce6392d9103c.tar.gz
opie-02ef45be75a3024df11365956e1cce6392d9103c.tar.bz2
Each file in this commit has an issue where the initial value of a variable
is assumed to be something but no initial value is given. This commit changes that by either assigning an initial value or removing the assumption on an initial value (usually the former).
Diffstat (limited to 'noncore/apps/opie-reader/Palm2QImage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Palm2QImage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp
index 361755f..09cad1c 100644
--- a/noncore/apps/opie-reader/Palm2QImage.cpp
+++ b/noncore/apps/opie-reader/Palm2QImage.cpp
@@ -125,7 +125,7 @@ QImage* Palm2QImage
125 unsigned int width, height, bytes_per_row, flags, next_depth_offset; 125 unsigned int width, height, bytes_per_row, flags, next_depth_offset;
126 unsigned int bits_per_pixel, version, transparent_index, compression_type, i, j, inval, inbit, mask, incount; 126 unsigned int bits_per_pixel, version, transparent_index, compression_type, i, j, inval, inbit, mask, incount;
127 unsigned int palm_red_bits, palm_green_bits, palm_blue_bits; 127 unsigned int palm_red_bits, palm_green_bits, palm_blue_bits;
128 unsigned char *palm_ptr, *x_ptr, *imagedata, *inbyte, *rowbuf, *lastrow, 128 unsigned char *palm_ptr, *x_ptr, *inbyte, *rowbuf, *lastrow,
129 *imagedatastart, *palmimage; 129 *imagedatastart, *palmimage;
130 ColorMapEntry *colormap; 130 ColorMapEntry *colormap;
131 131
@@ -213,7 +213,7 @@ QImage* Palm2QImage
213 rowbuf = new unsigned char[bytes_per_row * width]; 213 rowbuf = new unsigned char[bytes_per_row * width];
214 lastrow = new unsigned char[bytes_per_row * width]; 214 lastrow = new unsigned char[bytes_per_row * width];
215 215
216 for (i=0, palm_ptr = imagedatastart , x_ptr = imagedata; i < height; ++i) { 216 for (i=0, palm_ptr = imagedatastart , x_ptr = 0; i < height; ++i) {
217// qDebug("inval:%x palm_ptr:%x x_ptr:%x bpr:%x", inval, palm_ptr, x_ptr, bytes_per_row); 217// qDebug("inval:%x palm_ptr:%x x_ptr:%x bpr:%x", inval, palm_ptr, x_ptr, bytes_per_row);
218 218
219 /* first, uncompress the Palm image */ 219 /* first, uncompress the Palm image */