Fixing compilation warnings

merge-requests/1/head
Mattias Ellert 2006-01-22 09:04:41 +00:00
rodzic a94c601a6c
commit 6f301b10ed
6 zmienionych plików z 19 dodań i 9 usunięć

Wyświetl plik

@ -1,3 +1,9 @@
2006-01-22 Mattias Ellert <mattias.ellert@tsl.uu.se>
* backend/dll.c, backend/plustek-usbhw.c, backend/plustek-usbscan.c,
sanei/sanei_pio.c: Fixed warnings about C++ style comments.
* backend/hp5400_xfer.h: Fixed compilation warnings.
2006-01-21 Mattias Ellert <mattias.ellert@tsl.uu.se> 2006-01-21 Mattias Ellert <mattias.ellert@tsl.uu.se>
* backend/canon-sane.c: Fixed variable redeclaration. * backend/canon-sane.c: Fixed variable redeclaration.

Wyświetl plik

@ -322,13 +322,13 @@ dyld_get_error_str ()
static SANE_Status static SANE_Status
load (struct backend *be) load (struct backend *be)
{ {
// use BeOS kernel function to load scanner addons from ~/config/add-ons/SANE/ /* use BeOS kernel function to load scanner addons from ~/config/add-ons/SANE */
char path[PATH_MAX]; char path[PATH_MAX];
image_id id = -1; image_id id = -1;
int i, w; int i, w;
directory_which which[3] = { B_USER_ADDONS_DIRECTORY, B_COMMON_ADDONS_DIRECTORY, B_BEOS_ADDONS_DIRECTORY }; directory_which which[3] = { B_USER_ADDONS_DIRECTORY, B_COMMON_ADDONS_DIRECTORY, B_BEOS_ADDONS_DIRECTORY };
// look for config files in SANE/conf /* look for config files in SANE/conf */
for (w = 0; (w < 3) && (id < 0) && (find_directory(which[w],0,true,path,PATH_MAX) == 0); w++) for (w = 0; (w < 3) && (id < 0) && (find_directory(which[w],0,true,path,PATH_MAX) == 0); w++)
{ {
strcat(path,"/SANE/"); strcat(path,"/SANE/");
@ -814,8 +814,8 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
fclose (fp); fclose (fp);
#else #else
// no ugly config files, just get scanners from their ~/config/add-ons/SANE /* no ugly config files, just get scanners from their ~/config/add-ons/SANE */
// look for drivers /* look for drivers */
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {
if (find_directory(which[i],0,true,path,1024) < B_OK) if (find_directory(which[i],0,true,path,1024) < B_OK)
@ -857,8 +857,8 @@ sane_exit (void)
(*(op_exit_t)be->op[OP_EXIT]) (); (*(op_exit_t)be->op[OP_EXIT]) ();
} }
#ifdef __BEOS__ #ifdef __BEOS__
// use BeOS kernel functions to unload add-ons /* use BeOS kernel functions to unload add-ons */
if(be->handle) unload_add_on((image_id)be->handle); if(be->handle) unload_add_on((image_id)be->handle);
#else #else
#ifdef HAVE_DLL #ifdef HAVE_DLL

Wyświetl plik

@ -63,11 +63,15 @@ HP5400_SANE_STATIC int hp5400_command_read_noverify (int iHandle, int iCmd, int
HP5400_SANE_STATIC int hp5400_command_write (int iHandle, int iCmd, int iLen, void *pbData); HP5400_SANE_STATIC int hp5400_command_write (int iHandle, int iCmd, int iLen, void *pbData);
HP5400_SANE_STATIC void hp5400_command_write_noverify (int fd, int iValue, void *pabData, HP5400_SANE_STATIC void hp5400_command_write_noverify (int fd, int iValue, void *pabData,
int iSize); int iSize);
#ifdef STANDALONE
HP5400_SANE_STATIC int hp5400_bulk_read (int iHandle, size_t size, int block, FILE * file); HP5400_SANE_STATIC int hp5400_bulk_read (int iHandle, size_t size, int block, FILE * file);
#endif
HP5400_SANE_STATIC int hp5400_bulk_read_block (int iHandle, int iCmd, void *cmd, int cmdlen, HP5400_SANE_STATIC int hp5400_bulk_read_block (int iHandle, int iCmd, void *cmd, int cmdlen,
void *buffer, int len); void *buffer, int len);
HP5400_SANE_STATIC int hp5400_bulk_command_write (int iHandle, int iCmd, void *cmd, int cmdlen, HP5400_SANE_STATIC int hp5400_bulk_command_write (int iHandle, int iCmd, void *cmd, int cmdlen,
int len, int block, char *data); int len, int block, char *data);
#ifdef STANDALONE
HP5400_SANE_STATIC int hp5400_isOn (int iHandle); HP5400_SANE_STATIC int hp5400_isOn (int iHandle);
#endif
#endif #endif

Wyświetl plik

@ -696,7 +696,7 @@ static SANE_Bool usb_ModuleToHome( Plustek_Device *dev, SANE_Bool fWait )
u_long dwSpeedUp = GetTickCount () + 250; u_long dwSpeedUp = GetTickCount () + 250;
//while(GetTickCount () < dwSpeedUp) /* while(GetTickCount () < dwSpeedUp) */
while((int)(dwSpeedUp - GetTickCount ()) > 0) while((int)(dwSpeedUp - GetTickCount ()) > 0)
{ {
Sleep (10); Sleep (10);

Wyświetl plik

@ -1478,7 +1478,7 @@ static SANE_Bool usb_ScanReadImage( Plustek_Device *dev,
if(!dwBytes) if(!dwBytes)
{ {
WriteRegister(0x07, 0); // To stop scanning WriteRegister(0x07, 0); /* To stop scanning */
ScanInf.m_fADF++; ScanInf.m_fADF++;
if(dwSize > dw) if(dwSize > dw)
ScanReadImage((PBYTE)pBuf + dw, dwSize - dw); ScanReadImage((PBYTE)pBuf + dw, dwSize - dw);

Wyświetl plik

@ -533,7 +533,7 @@ sanei_pio_open (const char *dev, int *fdp)
{ {
int fp; int fp;
// open internal parallel port /* open internal parallel port */
fp=open("/dev/parallel/parallel1",O_RDWR); fp=open("/dev/parallel/parallel1",O_RDWR);
*fdp=fp; *fdp=fp;