kopia lustrzana https://gitlab.com/sane-project/backends
Fix -Wimplicit-fallthrough warnings by adding standard annotations
rodzic
72d68c7367
commit
e40596c2a5
|
@ -1485,6 +1485,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
case OPT_BR_Y:
|
||||
if (info)
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
// fall through
|
||||
case OPT_SHARPEN:
|
||||
case OPT_EXPOSURE:
|
||||
case OPT_ATTENUATION_RED:
|
||||
|
|
|
@ -2065,6 +2065,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
DBG (FLOW_CONTROL, "Value %g (Fixed)\n",
|
||||
(action == SANE_ACTION_GET_VALUE) ? v1 : v2);
|
||||
}
|
||||
// fall through
|
||||
default:
|
||||
DBG (FLOW_CONTROL, "Value %u (Int).\n",
|
||||
(action == SANE_ACTION_GET_VALUE)
|
||||
|
|
|
@ -1894,7 +1894,7 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
DBG(17, "invalid br-x or br-y\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
/* passthru */
|
||||
// fall through
|
||||
case OPT_TL_X:
|
||||
case OPT_TL_Y:
|
||||
sval->w = *((SANE_Word *) value);
|
||||
|
|
|
@ -1055,7 +1055,7 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
DBG(17, " invalid br-x or br-y\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
/* passthru */
|
||||
// fall through
|
||||
case OPT_TL_X:
|
||||
case OPT_TL_Y:
|
||||
sval->w = *((SANE_Word *) value);
|
||||
|
|
|
@ -1991,6 +1991,7 @@ option_get (TScanner * scanner, SANE_Int optid, void *result)
|
|||
/* scanner buttons */
|
||||
case opt_button_0:
|
||||
get_button_status (scanner);
|
||||
// fall through
|
||||
case opt_button_1:
|
||||
case opt_button_2:
|
||||
case opt_button_3:
|
||||
|
|
|
@ -3281,7 +3281,7 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
DBG(17, "invalid br-x or br-y\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
/* passthru */
|
||||
// fall through
|
||||
case OPT_TL_X:
|
||||
case OPT_TL_Y:
|
||||
sval->w = *((SANE_Word *) value);
|
||||
|
|
|
@ -2794,7 +2794,7 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
|
|||
DBG(17, "invalid br-x or br-y\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
/* passthru */
|
||||
// fall through
|
||||
case OPT_TL_X:
|
||||
case OPT_TL_Y:
|
||||
sval->w = *((SANE_Word *) value);
|
||||
|
|
|
@ -3444,6 +3444,7 @@ sane_control_option (SANE_Handle handle,
|
|||
case OPT_RESOLUTION:
|
||||
if (info)
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
// fall through
|
||||
case OPT_SPEED:
|
||||
case OPT_PREVIEW:
|
||||
case OPT_BACKTRACK:
|
||||
|
|
|
@ -2306,6 +2306,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
case OPT_BR_Y:
|
||||
if (info && s->val[option].w != *(SANE_Word *) val)
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
// fall through
|
||||
case OPT_NUM_OPTS:
|
||||
case OPT_THRESHOLD:
|
||||
/* xxx theoretically, we could use OPT_THRESHOLD in
|
||||
|
|
|
@ -2518,8 +2518,7 @@ sanei_bjnp_read_int (SANE_Int dn, SANE_Byte * buffer, size_t * size)
|
|||
}
|
||||
device[dn].polling_status = BJNP_POLL_STARTED;
|
||||
|
||||
/* fall through to BJNP_POLL_STARTED */
|
||||
|
||||
// fall through
|
||||
case BJNP_POLL_STARTED:
|
||||
/* we use only seonds accuracy between poll attempts */
|
||||
timeout = device[dn].bjnp_timeout /1000;
|
||||
|
|
|
@ -1912,6 +1912,7 @@ static void motorP96SetupRunTable( pScanData ps )
|
|||
case 3:
|
||||
if (*(p.pb + 2))
|
||||
bColor = 1;
|
||||
// fall through
|
||||
case 2:
|
||||
if (*(p.pb + 1))
|
||||
bColor++;
|
||||
|
|
|
@ -1916,6 +1916,7 @@ sane_control_option( SANE_Handle handle, SANE_Int option,
|
|||
case OPT_BUTTON_0:
|
||||
if(!s->calibrating)
|
||||
usb_UpdateButtonStatus(s);
|
||||
// fall through
|
||||
case OPT_BUTTON_1:
|
||||
case OPT_BUTTON_2:
|
||||
case OPT_BUTTON_3:
|
||||
|
|
|
@ -1625,7 +1625,7 @@ SANE_Status sane_control_option( SANE_Handle handle, SANE_Int option,
|
|||
*info |= SANE_INFO_RELOAD_OPTIONS | SANE_INFO_RELOAD_PARAMS;
|
||||
}
|
||||
|
||||
/* fall through to OPT_HALFTONE */
|
||||
// fall through
|
||||
case OPT_HALFTONE:
|
||||
s->val[option].w = optval - s->opt[option].constraint.string_list;
|
||||
break;
|
||||
|
|
|
@ -1022,6 +1022,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
case OPT_BR_Y:
|
||||
if (info)
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
// fall through
|
||||
case OPT_BRIGHT_ADJUST:
|
||||
case OPT_CONTR_ADJUST:
|
||||
s->val[option] = *(SANE_Word *) val;
|
||||
|
|
|
@ -2825,6 +2825,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
case OPT_BR_Y:
|
||||
if (info && s->val[option].w != *(SANE_Word *) val)
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
// fall through
|
||||
case OPT_NUM_OPTS:
|
||||
case OPT_THRESHOLD:
|
||||
/* xxx theoretically, we could use OPT_THRESHOLD in
|
||||
|
|
|
@ -609,9 +609,10 @@ sane_control_option (SANE_Handle handle, SANE_Int iOpt,
|
|||
{
|
||||
case optResolution:
|
||||
case optTLX: case optTLY: case optBRX: case optBRY:
|
||||
if (pnInfo) (*pnInfo) |= SANE_INFO_RELOAD_PARAMS;
|
||||
/* fall through side effect free */
|
||||
if (pnInfo) (*pnInfo) |= SANE_INFO_RELOAD_PARAMS;
|
||||
|
||||
#ifdef SM3600_SUPPORT_EXPOSURE
|
||||
// fall through
|
||||
case optBrightness:
|
||||
case optContrast:
|
||||
#endif
|
||||
|
|
|
@ -1462,6 +1462,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
if (info)
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
|
||||
// fall through
|
||||
case OPT_GRAY_GAIN:
|
||||
case OPT_GREEN_GAIN:
|
||||
case OPT_RED_GAIN:
|
||||
|
|
|
@ -10239,7 +10239,7 @@ moveToOrigin (void)
|
|||
end[0] = 0x19;
|
||||
end[1] = 0xD5;
|
||||
end[4] = 0x1B;
|
||||
|
||||
// fall through
|
||||
case 1220:
|
||||
case 2000:
|
||||
w = 300;
|
||||
|
@ -11226,6 +11226,7 @@ sanei_umax_pp_startScan (int x, int y, int width, int height, int dpi,
|
|||
}
|
||||
else
|
||||
y += 80;
|
||||
// fall through
|
||||
default:
|
||||
y += 8;
|
||||
break;
|
||||
|
|
|
@ -2675,6 +2675,7 @@ saned_avahi_callback (AvahiClient *c, AvahiClientState state, void *userdata)
|
|||
case AVAHI_CLIENT_S_COLLISION:
|
||||
DBG (DBG_INFO, "saned_avahi_callback: AVAHI_CLIENT_S_COLLISION\n");
|
||||
|
||||
// fall through
|
||||
case AVAHI_CLIENT_S_REGISTERING:
|
||||
DBG (DBG_INFO, "saned_avahi_callback: AVAHI_CLIENT_S_REGISTERING\n");
|
||||
if (avahi_group)
|
||||
|
|
|
@ -2261,7 +2261,7 @@ main (int argc, char **argv)
|
|||
printf ("default device is `%s'\n", defdevname);
|
||||
scanimage_exit (0);
|
||||
}
|
||||
|
||||
// fall through
|
||||
case 'V':
|
||||
printf ("scanimage (%s) %s; backend version %d.%d.%d\n", PACKAGE,
|
||||
VERSION, SANE_VERSION_MAJOR (version_code),
|
||||
|
|
|
@ -1611,7 +1611,7 @@ main (int argc, char **argv)
|
|||
usage (0);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
// fall through
|
||||
default:
|
||||
printf ("unknown option: -%c, try -h for help\n", (*ap)[1]);
|
||||
exit (0);
|
||||
|
|
Ładowanie…
Reference in New Issue