kopia lustrzana https://gitlab.com/sane-project/backends
Merge branch 'correct_clang_warnings' into 'master'
various: convert pre-ANSI declarations to ANSI See merge request sane-project/backends!852734-support-for-canon-i-sensys-mf657cdw-mf650c-series
commit
41891ced44
|
@ -73,7 +73,7 @@ fedora-39-clang:
|
|||
image: $REGISTRY_HUB:fedora-39-clang
|
||||
variables:
|
||||
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
|
||||
MAKE_FLAGS: "CFLAGS='-Werror -Wno-error=unused-but-set-variable' CXXFLAGS='-Werror -Wno-error=unused-but-set-variable'"
|
||||
MAKE_FLAGS: "CFLAGS='-Werror -Wno-error=unused-but-set-variable' CXXFLAGS='-Werror'"
|
||||
<<: *compile_definition
|
||||
|
||||
alpine-3.18-musl:
|
||||
|
|
|
@ -544,9 +544,8 @@ static SANE_String_Const paper_list[] =
|
|||
0
|
||||
};
|
||||
|
||||
static /* inline */ int _is_host_little_endian(void);
|
||||
static /* inline */ int
|
||||
_is_host_little_endian()
|
||||
_is_host_little_endian(void)
|
||||
{
|
||||
SANE_Int val = 255;
|
||||
unsigned char *firstbyte = (unsigned char *) &val;
|
||||
|
|
|
@ -907,7 +907,7 @@ sane_get_select_fd (SANE_Handle __sane_unused__ handle,
|
|||
|
||||
/* Clears the contents of gKnownDevices and zeros it */
|
||||
void
|
||||
ClearKnownDevices ()
|
||||
ClearKnownDevices (void)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
|
|
@ -840,7 +840,8 @@ void scanner_move(Genesys_Device& dev, ScanMethod scan_method, unsigned steps, D
|
|||
|
||||
// FIXME: should porbably wait for some timeout
|
||||
Status status;
|
||||
for (unsigned i = 0;; ++i) {
|
||||
// for (unsigned i = 0;; ++i) {
|
||||
for(;;) {
|
||||
status = scanner_read_status(dev);
|
||||
if (status.is_feeding_finished || (
|
||||
direction == Direction::BACKWARD && status.is_at_home))
|
||||
|
|
|
@ -3809,7 +3809,7 @@ hp_optset_isEnabled (HpOptSet this, HpData data, const char *name,
|
|||
SANE_Status
|
||||
sanei_hp_optset_download (HpOptSet this, HpData data, HpScsi scsi)
|
||||
{
|
||||
int i, errcount = 0;
|
||||
int i; //, errcount = 0;
|
||||
|
||||
DBG(3, "Start downloading parameters to scanner\n");
|
||||
|
||||
|
@ -3839,7 +3839,7 @@ sanei_hp_optset_download (HpOptSet this, HpData data, HpScsi scsi)
|
|||
|
||||
if ( sanei_hp_scl_errcheck (scsi) != SANE_STATUS_GOOD )
|
||||
{
|
||||
errcount++;
|
||||
//errcount++;
|
||||
DBG(3, "Option %s generated scanner error\n",
|
||||
this->options[i]->descriptor->name);
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ typedef struct
|
|||
|
||||
/* Initialize structure where we remember out open file descriptors */
|
||||
void
|
||||
sanei_hp_init_openfd ()
|
||||
sanei_hp_init_openfd (void)
|
||||
{int iCount;
|
||||
memset (asHpOpenFd, 0, sizeof (asHpOpenFd));
|
||||
|
||||
|
|
|
@ -3813,7 +3813,7 @@ static SANE_Int cfg_timing_get(SANE_Int sensortype, SANE_Int tm, struct st_timin
|
|||
|
||||
/** SEC: Motor curves ---------- */
|
||||
|
||||
static SANE_Int *bq5550_motor()
|
||||
static SANE_Int *bq5550_motor(void)
|
||||
{
|
||||
SANE_Int *rst = NULL;
|
||||
SANE_Int steps[] =
|
||||
|
@ -3835,7 +3835,7 @@ static SANE_Int *bq5550_motor()
|
|||
return rst;
|
||||
}
|
||||
|
||||
static SANE_Int *hp4370_motor()
|
||||
static SANE_Int *hp4370_motor(void)
|
||||
{
|
||||
SANE_Int *rst = NULL;
|
||||
SANE_Int steps[] =
|
||||
|
@ -3936,7 +3936,7 @@ static SANE_Int *hp4370_motor()
|
|||
return rst;
|
||||
}
|
||||
|
||||
static SANE_Int *hp3970_motor()
|
||||
static SANE_Int *hp3970_motor(void)
|
||||
{
|
||||
SANE_Int *rst = NULL;
|
||||
SANE_Int steps[] =
|
||||
|
@ -4037,7 +4037,7 @@ static SANE_Int *hp3970_motor()
|
|||
return rst;
|
||||
}
|
||||
|
||||
static SANE_Int *hp3800_motor()
|
||||
static SANE_Int *hp3800_motor(void)
|
||||
{
|
||||
SANE_Int *rst = NULL;
|
||||
SANE_Int steps[] =
|
||||
|
@ -4182,7 +4182,7 @@ static SANE_Int *hp3800_motor()
|
|||
return rst;
|
||||
}
|
||||
|
||||
static SANE_Int *cfg_motorcurve_get()
|
||||
static SANE_Int *cfg_motorcurve_get(void)
|
||||
{
|
||||
/* returns motor setting buffer for a device */
|
||||
|
||||
|
|
|
@ -618,7 +618,7 @@ RTS_Free (struct st_device *dev)
|
|||
}
|
||||
|
||||
static struct st_device *
|
||||
RTS_Alloc ()
|
||||
RTS_Alloc (void)
|
||||
{
|
||||
/* this function allocates space for device's variable */
|
||||
|
||||
|
@ -6304,7 +6304,7 @@ Gamma_GetTables (struct st_device *dev, SANE_Byte * Gamma_buffer)
|
|||
}
|
||||
|
||||
static void
|
||||
Gamma_FreeTables ()
|
||||
Gamma_FreeTables (void)
|
||||
{
|
||||
SANE_Int c;
|
||||
|
||||
|
@ -11319,7 +11319,7 @@ Head_Relocate (struct st_device *dev, SANE_Int speed, SANE_Int direction,
|
|||
}
|
||||
|
||||
static SANE_Int
|
||||
Calib_CreateFixedBuffers ()
|
||||
Calib_CreateFixedBuffers (void)
|
||||
{
|
||||
SANE_Byte channel;
|
||||
SANE_Int ret;
|
||||
|
@ -14002,7 +14002,7 @@ Free_Constrains (struct st_device *dev)
|
|||
}
|
||||
|
||||
static void
|
||||
RTS_DebugInit ()
|
||||
RTS_DebugInit (void)
|
||||
{
|
||||
/* Default values */
|
||||
RTS_Debug->dev_model = HP3970;
|
||||
|
|
|
@ -1752,7 +1752,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
SANE_Char line[PATH_MAX];
|
||||
SANE_Char *str = NULL;
|
||||
SANE_String_Const proper_str;
|
||||
SANE_Int nline = 0;
|
||||
//SANE_Int nline = 0;
|
||||
|
||||
/* Initialize debug */
|
||||
DBG_INIT ();
|
||||
|
@ -1771,7 +1771,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
{
|
||||
while (sanei_config_read (line, sizeof (line), conf_fp))
|
||||
{
|
||||
nline++;
|
||||
//nline++;
|
||||
if (str)
|
||||
free (str);
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static TScannerModel Model_HP54xx =
|
|||
|
||||
HP5400_SANE_STATIC
|
||||
int
|
||||
InitHp5400_internal() {
|
||||
InitHp5400_internal(void) {
|
||||
|
||||
MatchVersions = malloc( sizeof(versionString) * numVersions );
|
||||
strcpy( MatchVersions[0].strVersion, "SilitekIBlizd C3 ScannerV0.84");
|
||||
|
@ -121,7 +121,7 @@ InitHp5400_internal() {
|
|||
|
||||
HP5400_SANE_STATIC
|
||||
int
|
||||
FreeHp5400_internal() {
|
||||
FreeHp5400_internal(void) {
|
||||
|
||||
free(MatchVersions);
|
||||
MatchVersions = NULL;
|
||||
|
|
|
@ -648,7 +648,7 @@ DetectScanner (void)
|
|||
}
|
||||
|
||||
static void
|
||||
StandByScanner ()
|
||||
StandByScanner (void)
|
||||
{
|
||||
WriteScannerRegister (0x74, 0x80);
|
||||
WriteScannerRegister (0x75, 0x0C);
|
||||
|
@ -678,7 +678,7 @@ SwitchHardwareState (SANE_Byte mask, SANE_Byte invert_mask)
|
|||
|
||||
/*return value: 0 - no paper, 1 - paper loaded.*/
|
||||
static int
|
||||
CheckPaperPresent ()
|
||||
CheckPaperPresent (void)
|
||||
{
|
||||
if ((CallFunctionWithRetVal (0xB2) & 0x10) == 0)
|
||||
return 1; /*Ok - paper present. */
|
||||
|
@ -686,7 +686,7 @@ CheckPaperPresent ()
|
|||
}
|
||||
|
||||
static int
|
||||
ReleasePaper ()
|
||||
ReleasePaper (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -874,7 +874,7 @@ TurnOnPaperPulling (enumColorDepth enColor, SANE_Word wResolution)
|
|||
}
|
||||
|
||||
static void
|
||||
TurnOffPaperPulling ()
|
||||
TurnOffPaperPulling (void)
|
||||
{
|
||||
CallFunctionWithParameter (0x91, 0);
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ TurnOffPaperPulling ()
|
|||
While paper not loaded this is base "white point".
|
||||
*/
|
||||
static SANE_Byte
|
||||
GetCalibration ()
|
||||
GetCalibration (void)
|
||||
{
|
||||
int i;
|
||||
int Result;
|
||||
|
@ -1041,7 +1041,7 @@ PaperFeed (SANE_Word wLinesToFeed)
|
|||
|
||||
/*For now we do no calibrate elements - just set maximum limits. FIX ME?*/
|
||||
static void
|
||||
CalibrateScanElements ()
|
||||
CalibrateScanElements (void)
|
||||
{
|
||||
/*Those arrays will be used in future for correct calibration. */
|
||||
/*Then we need to transfer UP brightness border, we use these registers */
|
||||
|
@ -1260,7 +1260,7 @@ CalibrateScanElements ()
|
|||
|
||||
/*Returns 0 in case of fail and 1 in success.*/
|
||||
static int
|
||||
OutputCheck ()
|
||||
OutputCheck (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1277,7 +1277,7 @@ OutputCheck ()
|
|||
}
|
||||
|
||||
static int
|
||||
InputCheck ()
|
||||
InputCheck (void)
|
||||
{
|
||||
int i;
|
||||
SANE_Byte Buffer[256];
|
||||
|
@ -1298,7 +1298,7 @@ InputCheck ()
|
|||
}
|
||||
|
||||
static int
|
||||
CallCheck ()
|
||||
CallCheck (void)
|
||||
{
|
||||
int i;
|
||||
SANE_Byte Buffer[256];
|
||||
|
@ -1331,7 +1331,7 @@ CallCheck ()
|
|||
}
|
||||
|
||||
static void
|
||||
LoadingPaletteToScanner ()
|
||||
LoadingPaletteToScanner (void)
|
||||
{
|
||||
/*For now we have statical gamma. */
|
||||
SANE_Byte Gamma[256];
|
||||
|
@ -1394,7 +1394,7 @@ CallFunctionWithRetVal (SANE_Byte Function)
|
|||
}
|
||||
|
||||
static SANE_Byte
|
||||
ReadDataByte ()
|
||||
ReadDataByte (void)
|
||||
{
|
||||
SANE_Byte Result;
|
||||
|
||||
|
|
|
@ -2497,7 +2497,7 @@ sanei_lexmark_low_find_start_line (Lexmark_Device * dev)
|
|||
*/
|
||||
|
||||
|
||||
int blackLineCount = 0;
|
||||
// int blackLineCount = 0;
|
||||
int whiteLineCount = 0;
|
||||
int blackByteCounter = 0;
|
||||
unsigned char max_byte = 0;
|
||||
|
@ -2838,14 +2838,14 @@ sanei_lexmark_low_find_start_line (Lexmark_Device * dev)
|
|||
if (blackByteCounter > 0)
|
||||
{
|
||||
/* This was a black line */
|
||||
blackLineCount++;
|
||||
// blackLineCount++;
|
||||
whiteLineCount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is a white line */
|
||||
whiteLineCount++;
|
||||
blackLineCount = 0;
|
||||
// blackLineCount = 0;
|
||||
}
|
||||
} /* end for buffer */
|
||||
|
||||
|
|
|
@ -624,7 +624,7 @@ attach_one (SANE_String_Const devname)
|
|||
}
|
||||
|
||||
SANE_Status
|
||||
scan_devices(){
|
||||
scan_devices(void){
|
||||
DBG (2, "scan_devices\n");
|
||||
SANE_Char config_line[PATH_MAX];
|
||||
FILE *fp;
|
||||
|
|
|
@ -78,7 +78,7 @@ static int mustek_scsi_pp_timeout = 5000;
|
|||
|
||||
/* FIXME: use same method as mustek.c ? */
|
||||
static int
|
||||
mustek_scsi_pp_get_time ()
|
||||
mustek_scsi_pp_get_time (void)
|
||||
{
|
||||
struct timeval tv;
|
||||
int retval;
|
||||
|
|
|
@ -537,7 +537,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
GetDeviceStatus ()
|
||||
GetDeviceStatus (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "GetDeviceStatus: start\n");
|
||||
return MustScanner_GetScannerState ();
|
||||
|
@ -576,7 +576,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
CarriageHome ()
|
||||
CarriageHome (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "CarriageHome: start\n");
|
||||
return MustScanner_BackHome ();
|
||||
|
@ -914,7 +914,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
StartScan ()
|
||||
StartScan (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "StartScan: start\n");
|
||||
if (ST_Reflective == g_ScanType)
|
||||
|
@ -1099,7 +1099,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
StopScan ()
|
||||
StopScan (void)
|
||||
{
|
||||
SANE_Bool rt;
|
||||
int i;
|
||||
|
@ -1159,7 +1159,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
IsTAConnected ()
|
||||
IsTAConnected (void)
|
||||
{
|
||||
SANE_Bool hasTA;
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
MustScanner_Init ()
|
||||
MustScanner_Init (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "MustScanner_Init: Call in\n");
|
||||
|
||||
|
@ -260,7 +260,7 @@ Return value:
|
|||
return FASLE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
MustScanner_GetScannerState ()
|
||||
MustScanner_GetScannerState (void)
|
||||
{
|
||||
|
||||
if (SANE_STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
|
||||
|
@ -343,7 +343,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
MustScanner_BackHome ()
|
||||
MustScanner_BackHome (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "MustScanner_BackHome: call in \n");
|
||||
|
||||
|
@ -3081,7 +3081,7 @@ Return value:
|
|||
the lines of scanned
|
||||
***********************************************************************/
|
||||
static unsigned int
|
||||
GetScannedLines ()
|
||||
GetScannedLines (void)
|
||||
{
|
||||
unsigned int dwScannedLines = 0;
|
||||
|
||||
|
@ -3103,7 +3103,7 @@ Return value:
|
|||
the lines which pass to superstratum
|
||||
***********************************************************************/
|
||||
static unsigned int
|
||||
GetReadyLines ()
|
||||
GetReadyLines (void)
|
||||
{
|
||||
unsigned int dwReadyLines = 0;
|
||||
|
||||
|
@ -3143,7 +3143,7 @@ Return value:
|
|||
none
|
||||
***********************************************************************/
|
||||
static void
|
||||
AddReadyLines ()
|
||||
AddReadyLines (void)
|
||||
{
|
||||
pthread_mutex_lock (&g_readyLinesMutex);
|
||||
g_wtheReadyLines++;
|
||||
|
|
|
@ -72,7 +72,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Reflective_Reset ()
|
||||
Reflective_Reset (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "Reflective_Reset: call in\n");
|
||||
|
||||
|
@ -576,7 +576,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Reflective_AdjustAD ()
|
||||
Reflective_AdjustAD (void)
|
||||
{
|
||||
SANE_Byte * lpCalData;
|
||||
unsigned short wCalWidth;
|
||||
|
@ -1293,7 +1293,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Reflective_StopScan ()
|
||||
Reflective_StopScan (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "Reflective_StopScan: call in\n");
|
||||
if (!g_bOpened)
|
||||
|
@ -1338,7 +1338,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Reflective_LineCalibration16Bits ()
|
||||
Reflective_LineCalibration16Bits (void)
|
||||
{
|
||||
SANE_Status status;
|
||||
SANE_Byte * lpWhiteData;
|
||||
|
@ -1758,7 +1758,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Reflective_PrepareScan ()
|
||||
Reflective_PrepareScan (void)
|
||||
{
|
||||
g_wScanLinesPerBlock = g_dwBufferSize / g_BytesPerRow;
|
||||
g_wMaxScanLines = g_dwImageBufferSize / g_BytesPerRow;
|
||||
|
|
|
@ -73,7 +73,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Transparent_Reset ()
|
||||
Transparent_Reset (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "Transparent_Reset: call in\n");
|
||||
|
||||
|
@ -502,7 +502,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Transparent_StopScan ()
|
||||
Transparent_StopScan (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "Transparent_StopScan: call in\n");
|
||||
|
||||
|
@ -613,7 +613,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Transparent_AdjustAD ()
|
||||
Transparent_AdjustAD (void)
|
||||
{
|
||||
SANE_Byte * lpCalData;
|
||||
unsigned short wCalWidth;
|
||||
|
@ -1659,7 +1659,7 @@ Return value:
|
|||
return FALSE
|
||||
***********************************************************************/
|
||||
static SANE_Bool
|
||||
Transparent_PrepareScan ()
|
||||
Transparent_PrepareScan (void)
|
||||
{
|
||||
DBG (DBG_FUNC, "Transparent_PrepareScan: call in\n");
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ add_device (const char *name, Net_Device ** ndp)
|
|||
#endif /* NET_USES_AF_INDEP */
|
||||
|
||||
/* Calls getpwuid_r(). The return value must be freed by the caller. */
|
||||
char* get_current_username()
|
||||
static char* get_current_username(void)
|
||||
{
|
||||
long bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
|
||||
if (bufsize == -1)
|
||||
|
|
|
@ -422,7 +422,7 @@ static Bool ioP98OpenScanPath( pScanData ps )
|
|||
{
|
||||
Byte tmp;
|
||||
ULong dw;
|
||||
ULong dwTime = 1;
|
||||
// ULong dwTime = 1; // Doesn't seem to be used. [RL]
|
||||
|
||||
if( 0 == ps->IO.bOpenCount ) {
|
||||
|
||||
|
@ -457,7 +457,7 @@ static Bool ioP98OpenScanPath( pScanData ps )
|
|||
ps->IO.bOpenCount = 0;
|
||||
}
|
||||
|
||||
dwTime++;
|
||||
// dwTime++; // Doesn't seem to be used. [RL]
|
||||
}
|
||||
DBG( DBG_IO, "ioP98OpenScanPath() failed!\n" );
|
||||
return _FALSE;
|
||||
|
|
|
@ -457,7 +457,7 @@ static int enqueue_bq(int fd,const void *src, size_t src_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void dequeue_bq()
|
||||
static void dequeue_bq(void)
|
||||
{
|
||||
static const char me[] = "dequeue_bq";
|
||||
struct usb_busy_queue *tbqe;
|
||||
|
|
|
@ -1255,7 +1255,7 @@ fail:
|
|||
}
|
||||
|
||||
static void
|
||||
cleanup_initial_string_values ()
|
||||
cleanup_initial_string_values (void)
|
||||
{
|
||||
// Cleanup backing memory for initial values of string options.
|
||||
free (init_mode);
|
||||
|
|
|
@ -1496,7 +1496,7 @@ ECPFifoMode (void)
|
|||
/* wait for ack bit */
|
||||
/* return 1 on success, 0 on error */
|
||||
static int
|
||||
waitAck ()
|
||||
waitAck (void)
|
||||
{
|
||||
unsigned char breg = 0;
|
||||
int i = 0;
|
||||
|
|
|
@ -449,7 +449,7 @@ sanei_umax_pp_status (void)
|
|||
}
|
||||
|
||||
int
|
||||
sanei_umax_pp_close ()
|
||||
sanei_umax_pp_close (void)
|
||||
{
|
||||
#ifdef HAVE_LINUX_PPDEV_H
|
||||
int fd;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
extern int sanei_debug_xerox_mfp;
|
||||
|
||||
static int
|
||||
xerox_need_clear_halt()
|
||||
xerox_need_clear_halt(void)
|
||||
{
|
||||
char *env;
|
||||
int workaround = 0;
|
||||
|
|
|
@ -217,12 +217,12 @@ extern SANE_Status sanei_usb_testing_enable_record(SANE_String_Const path,
|
|||
* Returns backend name for the file registered in sanei_usb_testing_enable.
|
||||
* The caller is responsible for freeing it.
|
||||
*/
|
||||
extern SANE_String sanei_usb_testing_get_backend();
|
||||
extern SANE_String sanei_usb_testing_get_backend(void);
|
||||
|
||||
/** Returns SANE_TRUE if replay testing mode is enabled, i.e. whether we are working with fake
|
||||
* scan data.
|
||||
*/
|
||||
extern SANE_Bool sanei_usb_is_replay_mode_enabled();
|
||||
extern SANE_Bool sanei_usb_is_replay_mode_enabled(void);
|
||||
|
||||
/** Clears currently recorded data.
|
||||
|
||||
|
@ -235,7 +235,7 @@ extern SANE_Bool sanei_usb_is_replay_mode_enabled();
|
|||
This function may only be called when no USB devices are open, otherwise the behavior is
|
||||
unpredictable.
|
||||
*/
|
||||
extern void sanei_usb_testing_record_clear();
|
||||
extern void sanei_usb_testing_record_clear(void);
|
||||
|
||||
/** Records a debug message in the captured USB data if testing mode is enabled. If testing mode
|
||||
* is not enabled, this function does nothing.
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
static char *dir_list;
|
||||
|
||||
const char *
|
||||
sanei_config_get_paths ()
|
||||
sanei_config_get_paths (void)
|
||||
{
|
||||
#ifdef __BEOS__
|
||||
char result[PATH_MAX];
|
||||
|
|
|
@ -876,7 +876,7 @@ pa4s2_close (int fd, SANE_Status * status)
|
|||
}
|
||||
|
||||
const char **
|
||||
sanei_pa4s2_devices()
|
||||
sanei_pa4s2_devices(void)
|
||||
{
|
||||
|
||||
SANE_Status status;
|
||||
|
|
|
@ -2053,7 +2053,7 @@ issue (struct req *req)
|
|||
fdp->sane_qhead = fdp->sane_qtail = 0;
|
||||
}
|
||||
|
||||
void sanei_scsi_req_flush_all ()
|
||||
void sanei_scsi_req_flush_all (void)
|
||||
{
|
||||
int fd, i, j = 0;
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ SANE_Status sanei_usb_testing_enable_replay(SANE_String_Const path,
|
|||
fail_test(); \
|
||||
} while (0)
|
||||
|
||||
void fail_test()
|
||||
static void fail_test(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -671,12 +671,12 @@ static int sanei_xml_is_known_commands_end(xmlNode* node)
|
|||
return xmlStrcmp(node->name, (const xmlChar*)"known_commands_end") == 0;
|
||||
}
|
||||
|
||||
static xmlNode* sanei_xml_peek_next_tx_node()
|
||||
static xmlNode* sanei_xml_peek_next_tx_node(void)
|
||||
{
|
||||
return testing_xml_next_tx_node;
|
||||
}
|
||||
|
||||
static xmlNode* sanei_xml_get_next_tx_node()
|
||||
static xmlNode* sanei_xml_get_next_tx_node(void)
|
||||
{
|
||||
xmlNode* next = testing_xml_next_tx_node;
|
||||
|
||||
|
@ -906,7 +906,7 @@ static void sanei_xml_record_seq(xmlNode* node)
|
|||
testing_last_known_seq = seq;
|
||||
}
|
||||
|
||||
static void sanei_xml_break()
|
||||
static void sanei_xml_break(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1030,7 +1030,7 @@ static int sanei_usb_check_data_equal(xmlNode* node,
|
|||
return 0;
|
||||
}
|
||||
|
||||
SANE_String sanei_usb_testing_get_backend()
|
||||
SANE_String sanei_usb_testing_get_backend(void)
|
||||
{
|
||||
if (testing_xml_doc == NULL)
|
||||
return NULL;
|
||||
|
@ -1054,7 +1054,7 @@ SANE_String sanei_usb_testing_get_backend()
|
|||
return ret;
|
||||
}
|
||||
|
||||
SANE_Bool sanei_usb_is_replay_mode_enabled()
|
||||
SANE_Bool sanei_usb_is_replay_mode_enabled(void)
|
||||
{
|
||||
if (testing_mode == sanei_usb_testing_mode_replay)
|
||||
return SANE_TRUE;
|
||||
|
@ -1123,7 +1123,7 @@ static void sanei_usb_replay_debug_msg(SANE_String_Const message)
|
|||
}
|
||||
}
|
||||
|
||||
extern void sanei_usb_testing_record_clear()
|
||||
extern void sanei_usb_testing_record_clear(void)
|
||||
{
|
||||
if (testing_mode != sanei_usb_testing_mode_record)
|
||||
return;
|
||||
|
@ -1153,7 +1153,7 @@ static void sanei_usb_add_endpoint(device_list_type* device,
|
|||
SANE_Int ep_address,
|
||||
SANE_Int ep_direction);
|
||||
|
||||
static SANE_Status sanei_usb_testing_init()
|
||||
static SANE_Status sanei_usb_testing_init(void)
|
||||
{
|
||||
DBG_INIT();
|
||||
|
||||
|
@ -1311,7 +1311,7 @@ static SANE_Status sanei_usb_testing_init()
|
|||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
static void sanei_usb_testing_exit()
|
||||
static void sanei_usb_testing_exit(void)
|
||||
{
|
||||
if (testing_development_mode || testing_mode == sanei_usb_testing_mode_record)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue