Skip to content

Commit db34114

Browse files
committed
Get rid of warning variable hides local / global declaration.
1 parent d51d9b6 commit db34114

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

Diff for: gui.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -783,10 +783,10 @@ void tzsettitle( struct textzone *ptz, char *title )
783783
ptz->py = oy;
784784
}
785785

786-
SDL_bool in_textzone( struct textzone *tz, int x, int y )
786+
SDL_bool in_textzone( struct textzone *tz_, int x, int y )
787787
{
788-
if( ( x >= tz->x ) && ( x < (tz->x+tz->w*8) ) &&
789-
( y >= tz->y ) && ( y < (tz->y+tz->h*12) ) )
788+
if( ( x >= tz_->x ) && ( x < (tz_->x+tz_->w*8) ) &&
789+
( y >= tz_->y ) && ( y < (tz_->y+tz_->h*12) ) )
790790
{
791791
return SDL_TRUE;
792792
}

Diff for: gui_win.c

+11-11
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,20 @@ char* get_clipboard_text_win(void)
8989
return text;
9090
}
9191

92-
static void set_clipboard_text_win(const char* text)
92+
static void set_clipboard_text_win(const char* text_)
9393
{
9494
if (!initialized)
9595
return;
9696

97-
if ( text != NULL )
97+
if ( text_ != NULL )
9898
{
9999
if ( OpenClipboard(g_SDL_Window) )
100100
{
101-
HANDLE hMem = GlobalAlloc((GMEM_MOVEABLE|GMEM_DDESHARE), strlen(text)+1);
101+
HANDLE hMem = GlobalAlloc((GMEM_MOVEABLE|GMEM_DDESHARE), strlen(text_)+1);
102102
if ( hMem != NULL )
103103
{
104104
char* dst = (char*)GlobalLock(hMem);
105-
memcpy(dst, text, strlen(text)+1);
105+
memcpy(dst, text_, strlen(text_)+1);
106106
GlobalUnlock(hMem);
107107
EmptyClipboard();
108108
SetClipboardData(CF_TEXT, hMem);
@@ -141,7 +141,7 @@ SDL_bool clipboard_copy( struct machine *oric )
141141
return SDL_FALSE;
142142

143143
int line, col, i;
144-
char text[40 * 28 + 28 + 1];
144+
char text_[40 * 28 + 28 + 1];
145145
unsigned char *vidmem = (&oric->mem[oric->vid_addr]);
146146

147147
for (i = 0, line = 0; line < 28; line++) {
@@ -153,16 +153,16 @@ SDL_bool clipboard_copy( struct machine *oric )
153153
}
154154

155155
if (c < ' ' || c == 127) {
156-
text[i++] = ' ';
156+
text_[i++] = ' ';
157157
} else
158-
text[i++] = (char)c;
158+
text_[i++] = (char)c;
159159
}
160-
text[i++] = '\n';
160+
text_[i++] = '\n';
161161
}
162-
text[i++] = '\0';
163-
//printf("%s\n", text);
162+
text_[i++] = '\0';
163+
//printf("%s\n", text_);
164164

165-
set_clipboard_text_win(text);
165+
set_clipboard_text_win(text_);
166166
return SDL_TRUE;
167167
}
168168

Diff for: main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,9 @@ SDL_bool init( struct machine *oric, int argc, char *argv[] )
11871187
}
11881188
else
11891189
{
1190-
int i = 0;
1190+
int off = 0;
11911191
unsigned int addr;
1192-
if( !mon_getnum( oric, &addr, sto->start_breakpoint, &i, SDL_FALSE, SDL_FALSE, SDL_FALSE, SDL_TRUE ) )
1192+
if( !mon_getnum( oric, &addr, sto->start_breakpoint, &off, SDL_FALSE, SDL_FALSE, SDL_FALSE, SDL_TRUE ) )
11931193
{
11941194
error_printf( "Invalid breakpoint" );
11951195
free( sto );

Diff for: monitor.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -3987,18 +3987,18 @@ static unsigned int steppy_step( struct machine *oric )
39873987
return oric->cpu.icycles;
39883988
}
39893989

3990-
static SDL_bool clickzone( struct textzone *tz, int *tx, int *ty, SDL_bool *dblclk )
3990+
static SDL_bool clickzone( struct textzone *tz_, int *tx, int *ty, SDL_bool *dblclk )
39913991
{
39923992
int dx, dy;
39933993

3994-
if( !in_textzone( tz, leftclick[0].x, leftclick[0].y ) )
3994+
if( !in_textzone( tz_, leftclick[0].x, leftclick[0].y ) )
39953995
return SDL_FALSE;
39963996

3997-
*tx = (leftclick[0].x - tz->x) / 8;
3998-
*ty = (leftclick[0].y - tz->y) / 12;
3997+
*tx = (leftclick[0].x - tz_->x) / 8;
3998+
*ty = (leftclick[0].y - tz_->y) / 12;
39993999

4000-
dx = (leftclick[1].x - tz->x) / 8;
4001-
dy = (leftclick[1].y - tz->y) / 12;
4000+
dx = (leftclick[1].x - tz_->x) / 8;
4001+
dy = (leftclick[1].y - tz_->y) / 12;
40024002

40034003
if( ( (*tx) == dx ) && ( (*ty) == dy ) && ( (leftclick[0].time-leftclick[1].time) < 1000 ) )
40044004
{

Diff for: snapshot.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ SDL_bool load_snapshot(struct machine *oric, char *filename)
11411141
case DRV_PRAVETZ:
11421142
{
11431143
Uint8 tmp[PRAV_TRACKS_PER_DISK*PRAV_RAW_TRACK_SIZE*2];
1144-
Uint32 offs;
1144+
Uint32 offs_;
11451145

11461146
/* Get the pravetz block */
11471147
blk = load_block(oric, "PRV\x00", f, SDL_TRUE, 9+2*10, SDL_TRUE);
@@ -1250,12 +1250,12 @@ SDL_bool load_snapshot(struct machine *oric, char *filename)
12501250

12511251
sprintf(oric->wddisk.disk[i]->filename, "%s%cSNAPDISK%d.DSK", diskpath, PATHSEP, i);
12521252

1253-
offs = getu32(blk);
1253+
offs_ = getu32(blk);
12541254
oric->pravetz.drv[i].pimg = oric->wddisk.disk[i];
1255-
if (offs == 0xffffffff)
1255+
if (offs_ == 0xffffffff)
12561256
oric->pravetz.drv[i].sector_ptr = NULL;
12571257
else
1258-
oric->pravetz.drv[i].sector_ptr = &oric->pravetz.drv[i].pimg->rawimage[offs];
1258+
oric->pravetz.drv[i].sector_ptr = &oric->pravetz.drv[i].pimg->rawimage[offs_];
12591259

12601260
blk->id[0] = 0; // Don't find this one again
12611261
free_block(blk);

0 commit comments

Comments
 (0)