mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	fix variable initialization in loops
This commit is contained in:
		
							parent
							
								
									91c4c65693
								
							
						
					
					
						commit
						6869431c2b
					
				| 
						 | 
					@ -54,7 +54,6 @@ int
 | 
				
			||||||
ImagingSgiRleDecode(Imaging im, ImagingCodecState state,
 | 
					ImagingSgiRleDecode(Imaging im, ImagingCodecState state,
 | 
				
			||||||
		    UINT8* buf, int bytes)
 | 
							    UINT8* buf, int bytes)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int n, depth;
 | 
					 | 
				
			||||||
    UINT8* ptr;
 | 
					    UINT8* ptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ptr = buf;
 | 
					    ptr = buf;
 | 
				
			||||||
| 
						 | 
					@ -90,9 +89,11 @@ ImagingSgiRleDecode(Imaging im, ImagingCodecState state,
 | 
				
			||||||
    readlongtab(&ptr, state->ysize * zsize, lengthtab);
 | 
					    readlongtab(&ptr, state->ysize * zsize, lengthtab);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* get scanlines informations */
 | 
					    /* get scanlines informations */
 | 
				
			||||||
    for (int rowno = 0; rowno < state->ysize; ++rowno) {
 | 
					    int rowno;
 | 
				
			||||||
 | 
					    for (rowno = 0; rowno < state->ysize; ++rowno) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    	for (int channo = 0; channo < zsize; ++channo) {
 | 
					        int channo;
 | 
				
			||||||
 | 
					    	for (channo = 0; channo < zsize; ++channo) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    		unsigned long rleoffset = starttab[rowno + channo * state->ysize];
 | 
					    		unsigned long rleoffset = starttab[rowno + channo * state->ysize];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,7 +116,8 @@ ImagingSgiRleDecode(Imaging im, ImagingCodecState state,
 | 
				
			||||||
    		expandrow(scanline, rledata, 0);
 | 
					    		expandrow(scanline, rledata, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            /* populate the state buffer */
 | 
					            /* populate the state buffer */
 | 
				
			||||||
    		for (int x = 0; x < state->xsize; ++x) {
 | 
					            int x;
 | 
				
			||||||
 | 
					    		for (x = 0; x < state->xsize; ++x) {
 | 
				
			||||||
   				state->buffer[x * zsize + channo] = scanline[x];
 | 
					   				state->buffer[x * zsize + channo] = scanline[x];
 | 
				
			||||||
    		}
 | 
					    		}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user