mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
Fixed a semantic error. va_arg(ap, u_short) is nonsense except on i386's
with 16-bit ints, since u_short is promoted when it is passed to a varargs function. gcc now warns about this. We always pass small integers (this is well obuscated), so there are no conversion problems. Fixed a related style bug (bogus cast).
This commit is contained in:
parent
5d81c9882f
commit
74f168bf7a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96527
@ -362,8 +362,8 @@ bios16(struct bios_args *args, char *fmt, ...)
|
|||||||
stack -= 2;
|
stack -= 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': /* 16-bit integer */
|
case 's': /* 16-bit integer passed as an int */
|
||||||
i = va_arg(ap, u_short);
|
i = va_arg(ap, int);
|
||||||
stack -= 2;
|
stack -= 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -434,8 +434,8 @@ bios16(struct bios_args *args, char *fmt, ...)
|
|||||||
stack += 2;
|
stack += 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': /* 16-bit integer */
|
case 's': /* 16-bit integer passed as an int */
|
||||||
i = va_arg(ap, u_short);
|
i = va_arg(ap, int);
|
||||||
*(u_short *)stack = i;
|
*(u_short *)stack = i;
|
||||||
stack += 2;
|
stack += 2;
|
||||||
break;
|
break;
|
||||||
@ -559,7 +559,7 @@ pnpbios_identify(driver_t *driver, device_t parent)
|
|||||||
bzero(pd, bigdev);
|
bzero(pd, bigdev);
|
||||||
pda->next = currdev;
|
pda->next = currdev;
|
||||||
/* get current configuration */
|
/* get current configuration */
|
||||||
if ((error = bios16(&args, PNP_GET_DEVNODE, &pda->next, &pda->node, (u_int16_t)1))) {
|
if ((error = bios16(&args, PNP_GET_DEVNODE, &pda->next, &pda->node, 1))) {
|
||||||
printf("pnpbios: error %d making BIOS16 call\n", error);
|
printf("pnpbios: error %d making BIOS16 call\n", error);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -362,8 +362,8 @@ bios16(struct bios_args *args, char *fmt, ...)
|
|||||||
stack -= 2;
|
stack -= 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': /* 16-bit integer */
|
case 's': /* 16-bit integer passed as an int */
|
||||||
i = va_arg(ap, u_short);
|
i = va_arg(ap, int);
|
||||||
stack -= 2;
|
stack -= 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -434,8 +434,8 @@ bios16(struct bios_args *args, char *fmt, ...)
|
|||||||
stack += 2;
|
stack += 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': /* 16-bit integer */
|
case 's': /* 16-bit integer passed as an int */
|
||||||
i = va_arg(ap, u_short);
|
i = va_arg(ap, int);
|
||||||
*(u_short *)stack = i;
|
*(u_short *)stack = i;
|
||||||
stack += 2;
|
stack += 2;
|
||||||
break;
|
break;
|
||||||
@ -559,7 +559,7 @@ pnpbios_identify(driver_t *driver, device_t parent)
|
|||||||
bzero(pd, bigdev);
|
bzero(pd, bigdev);
|
||||||
pda->next = currdev;
|
pda->next = currdev;
|
||||||
/* get current configuration */
|
/* get current configuration */
|
||||||
if ((error = bios16(&args, PNP_GET_DEVNODE, &pda->next, &pda->node, (u_int16_t)1))) {
|
if ((error = bios16(&args, PNP_GET_DEVNODE, &pda->next, &pda->node, 1))) {
|
||||||
printf("pnpbios: error %d making BIOS16 call\n", error);
|
printf("pnpbios: error %d making BIOS16 call\n", error);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user