Mail Archives: djgpp-workers/1998/07/12/12:59:28
These changes shut up GCC when compiling stubedit.
*** src/stub/stubedit.c~0 Sat May 30 21:38:52 1998
--- src/stub/stubedit.c Fri Jul 10 17:26:42 1998
*************** void num_v2s(void *addr, char *buf)
*** 137,143 ****
{
unsigned char *c = (unsigned char *)addr;
unsigned long v = c[0] + (c[1]<<8) + (c[2]<<16) + (c[3]<<24);
! sprintf(buf, "%#lx (%dk)", v, v / 1024L);
}
void num_s2v(void *addr, char *buf, int max)
--- 137,143 ----
{
unsigned char *c = (unsigned char *)addr;
unsigned long v = c[0] + (c[1]<<8) + (c[2]<<16) + (c[3]<<24);
! sprintf(buf, "%#lx (%ldk)", v, v / 1024L);
}
void num_s2v(void *addr, char *buf, int max)
*************** void num_s2v(void *addr, char *buf, int
*** 145,151 ****
unsigned char *c = (unsigned char *)addr;
unsigned long r = 0;
char s = 0;
! sscanf(buf, "%i%c", &r, &s);
switch (s)
{
case 'k':
--- 145,151 ----
unsigned char *c = (unsigned char *)addr;
unsigned long r = 0;
char s = 0;
! sscanf(buf, "%li%c", &r, &s);
switch (s)
{
case 'k':
*************** void num_s2v(void *addr, char *buf, int
*** 158,164 ****
break;
}
if (max && r > max) {
! printf("Warning: %d reduced to %d\n", r, max);
r = max;
}
c[0] = r;
--- 158,164 ----
break;
}
if (max && r > max) {
! printf("Warning: %ld reduced to %d\n", r, max);
r = max;
}
c[0] = r;
*************** void give_help(void)
*** 223,229 ****
exit(1);
}
! main(int argc, char **argv)
{
int view_only = 0;
int i;
--- 223,229 ----
exit(1);
}
! int main(int argc, char **argv)
{
int view_only = 0;
int i;
- Raw text -