am ef54fe9a: Fix compilation error by declaring stride before the first goto

Merge commit 'ef54fe9aaab4124e61850062d2212b20c20c8ea5' into eclair-plus-aosp

* commit 'ef54fe9aaab4124e61850062d2212b20c20c8ea5':
  Fix compilation error by declaring stride before the first goto
This commit is contained in:
Xavier Ducrohet
2010-01-11 12:07:57 -08:00
committed by Android Git Automerger

View File

@@ -144,6 +144,7 @@ int read_PNG_File(const char* pInput, etc1_byte** ppImageData,
png_uint_32 height = 0; png_uint_32 height = 0;
int result = -1; int result = -1;
etc1_byte* pSourceImage = 0; etc1_byte* pSourceImage = 0;
png_uint_32 stride = 0;
if ((pIn = fopen(pInput, "rb")) == NULL) { if ((pIn = fopen(pInput, "rb")) == NULL) {
fprintf(stderr, "Could not open input file %s for reading: %d\n", fprintf(stderr, "Could not open input file %s for reading: %d\n",
@@ -196,7 +197,7 @@ int read_PNG_File(const char* pInput, etc1_byte** ppImageData,
&color_type, NULL, NULL, NULL); &color_type, NULL, NULL, NULL);
} }
png_uint_32 stride = 3 * width; stride = 3 * width;
pSourceImage = new etc1_byte[stride * height]; pSourceImage = new etc1_byte[stride * height];
if (! pSourceImage) { if (! pSourceImage) {