Remove casts in switch statements only meant to keep OpenWatcom happy

Remove casts in switch statements that were intended to keep
OpenWatcom happy.  It didn't work, and now we have a more general
solution for the problem, which also ought to be less dangerous.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2017-03-01 01:01:37 -08:00
parent e90a89abe4
commit 09dff8b257
5 changed files with 7 additions and 7 deletions

View File

@ -1586,7 +1586,7 @@ static void assemble_file(char *fname, StrList **depend_ptr)
stdscan_set(value);
tokval.t_type = TOKEN_INVALID;
if (stdscan(NULL, &tokval) != TOKEN_INVALID) {
switch ((int)tokval.t_integer) {
switch (tokval.t_integer) {
case S_REL:
globalrel = 1;
break;

View File

@ -107,7 +107,7 @@ static int prefix_slot(int prefix)
static void process_size_override(insn *result, operand *op)
{
if (tasm_compatible_mode) {
switch ((int)tokval.t_integer) {
switch (tokval.t_integer) {
/* For TASM compatibility a size override inside the
* brackets changes the size of the operand, not the
* address type of the operand as it does in standard
@ -146,7 +146,7 @@ static void process_size_override(insn *result, operand *op)
}
} else {
/* Standard NASM compatible syntax */
switch ((int)tokval.t_integer) {
switch (tokval.t_integer) {
case S_NOSPLIT:
op->eaflags |= EAF_TIMESTWO;
break;
@ -788,7 +788,7 @@ is_expression:
first = false;
op->type = 0; /* so far, no override */
while (i == TOKEN_SPECIAL) { /* size specifiers */
switch ((int)tokval.t_integer) {
switch (tokval.t_integer) {
case S_BYTE:
if (!setsize) /* we want to use only the first */
op->type |= BITS8;

View File

@ -581,7 +581,7 @@ static void as86_write_section(struct Section *sect, int index)
fwriteint16_t(p->number, ofile);
else
fputc(p->number, ofile);
switch ((int)s) {
switch (s) {
case 0:
break;
case 1:

View File

@ -787,7 +787,7 @@ static int32_t ieee_segment(char *name, int pass, int *bits)
nasm_error(ERR_NONFATAL, "segment alignment should be"
" numeric");
}
switch ((int)seg->align) {
switch (seg->align) {
case 1: /* BYTE */
case 2: /* WORD */
case 4: /* DWORD */

View File

@ -1495,7 +1495,7 @@ static int32_t obj_segment(char *name, int pass, int *bits)
nasm_error(ERR_NONFATAL, "segment alignment should be"
" numeric");
}
switch ((int)seg->align) {
switch (seg->align) {
case 1: /* BYTE */
case 2: /* WORD */
case 4: /* DWORD */