View Single Post
Old 05-06-13, 07:41 AM   #6
siddly
Registered User
 
Join Date: Jul 2003
Location: West Midlands, UK
Posts: 125
Default Re: [ 319.17 + 3.9 ] void value not ignored as it ought to be

from /usr/src/NVIDIA-Linux-x86_64-319.17/kernel/nv-linux.h:115,
from /usr/src/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.c:15:
/usr/src/linux-3.9.0/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
/usr/src/linux-3.9.0/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/src/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.c: In function ‘nv_i2c_del_adapter’:
/usr/src/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.c:316:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
/usr/src/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.c:328:13: error: void value not ignored as it ought to be
make[4]: *** [/usr/src/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.o] Error 1
make[3]: *** [_module_/usr/src/NVIDIA-Linux-x86_64-319.17/kernel] Error 2
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [install] Error 2

CODE:-
BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
{
struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
int osstatus = 0;
i2c_del_adapter(pI2cAdapter);
BOOL wasReleased = FALSE;

#if defined(KERNEL_2_4)
if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
return FALSE;
if (!NV_WEAK_SYMBOL_PRESENT(i2c_del_adapter))
return FALSE;
#endif

if (!pI2cAdapter) return FALSE;

// attempt release with the OS
osstatus = i2c_del_adapter(pI2cAdapter);

if (!osstatus)
{
os_free_mem(pI2cAdapter);
wasReleased = TRUE;
}

return wasReleased;
}
siddly is offline   Reply With Quote