Date:2014-05-18 21:19:03 (9 years 10 months ago)
Author:Maarten ter Huurne
Commit:9e113d88c7128512b3a28459930b4c46bf67b02b
Message:Fixed compilation with GCC 4.9

Files: src/imageio.cpp (1 diff)

Change Details

src/imageio.cpp
144144        goto cleanup;
145145    }
146146
147    // Compute row pointers.
148    png_bytep rowPointers[height];
149    for (png_uint_32 y = 0; y < height; y++) {
150        rowPointers[y] =
151            static_cast<png_bytep>(surface->pixels) + y * surface->pitch;
152    }
147    // Note: GCC 4.9 doesn't want to jump over 'rowPointers' with goto
148    // if it is in the outer scope.
149    {
150        // Compute row pointers.
151        png_bytep rowPointers[height];
152        for (png_uint_32 y = 0; y < height; y++) {
153            rowPointers[y] =
154                static_cast<png_bytep>(surface->pixels) + y * surface->pitch;
155        }
153156
154    // Read the entire image in one go.
155    png_read_image(png, rowPointers);
157        // Read the entire image in one go.
158        png_read_image(png, rowPointers);
159    }
156160
157161    // Read rest of file, and get additional chunks in the info struct.
158162    // Note: We got all we need, so skip this step.

Archive Download the corresponding diff file



interactive