From 6f301b10ed52d2a5d857ef646a4e19336baf3f53 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 22 Jan 2006 09:04:41 +0000 Subject: [PATCH] Fixing compilation warnings --- ChangeLog | 6 ++++++ backend/dll.c | 12 ++++++------ backend/hp5400_xfer.h | 4 ++++ backend/plustek-usbhw.c | 2 +- backend/plustek-usbscan.c | 2 +- sanei/sanei_pio.c | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9389b42f..4af3014da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-22 Mattias Ellert + + * 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 * backend/canon-sane.c: Fixed variable redeclaration. diff --git a/backend/dll.c b/backend/dll.c index a9d0a3461..6d84c41bb 100644 --- a/backend/dll.c +++ b/backend/dll.c @@ -322,13 +322,13 @@ dyld_get_error_str () static SANE_Status 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]; image_id id = -1; int i, w; 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++) { strcat(path,"/SANE/"); @@ -814,8 +814,8 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize) fclose (fp); #else - // no ugly config files, just get scanners from their ~/config/add-ons/SANE - // look for drivers + /* no ugly config files, just get scanners from their ~/config/add-ons/SANE */ + /* look for drivers */ for (i = 0; i < 3; i++) { 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]) (); } #ifdef __BEOS__ - // use BeOS kernel functions to unload add-ons - if(be->handle) unload_add_on((image_id)be->handle); + /* use BeOS kernel functions to unload add-ons */ + if(be->handle) unload_add_on((image_id)be->handle); #else #ifdef HAVE_DLL diff --git a/backend/hp5400_xfer.h b/backend/hp5400_xfer.h index 1317796d7..e3e823d11 100644 --- a/backend/hp5400_xfer.h +++ b/backend/hp5400_xfer.h @@ -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 void hp5400_command_write_noverify (int fd, int iValue, void *pabData, int iSize); +#ifdef STANDALONE 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, void *buffer, int len); HP5400_SANE_STATIC int hp5400_bulk_command_write (int iHandle, int iCmd, void *cmd, int cmdlen, int len, int block, char *data); +#ifdef STANDALONE HP5400_SANE_STATIC int hp5400_isOn (int iHandle); +#endif #endif diff --git a/backend/plustek-usbhw.c b/backend/plustek-usbhw.c index 8c126e895..0965c56dd 100644 --- a/backend/plustek-usbhw.c +++ b/backend/plustek-usbhw.c @@ -696,7 +696,7 @@ static SANE_Bool usb_ModuleToHome( Plustek_Device *dev, SANE_Bool fWait ) u_long dwSpeedUp = GetTickCount () + 250; - //while(GetTickCount () < dwSpeedUp) + /* while(GetTickCount () < dwSpeedUp) */ while((int)(dwSpeedUp - GetTickCount ()) > 0) { Sleep (10); diff --git a/backend/plustek-usbscan.c b/backend/plustek-usbscan.c index d8fc51add..c1ea0eb09 100644 --- a/backend/plustek-usbscan.c +++ b/backend/plustek-usbscan.c @@ -1478,7 +1478,7 @@ static SANE_Bool usb_ScanReadImage( Plustek_Device *dev, if(!dwBytes) { - WriteRegister(0x07, 0); // To stop scanning + WriteRegister(0x07, 0); /* To stop scanning */ ScanInf.m_fADF++; if(dwSize > dw) ScanReadImage((PBYTE)pBuf + dw, dwSize - dw); diff --git a/sanei/sanei_pio.c b/sanei/sanei_pio.c index ddc460ea0..3b251fa5d 100644 --- a/sanei/sanei_pio.c +++ b/sanei/sanei_pio.c @@ -533,7 +533,7 @@ sanei_pio_open (const char *dev, int *fdp) { int fp; - // open internal parallel port + /* open internal parallel port */ fp=open("/dev/parallel/parallel1",O_RDWR); *fdp=fp;