Strange compile error
Ron Alexander
rcalex at home.com
Tue May 2 15:53:28 GMT 2000
This code from Samba
SMB_ASSERT(b) ((b)?(void)0: \
(DEBUG(0,("PANIC: assert failed at %s(%d)\n", \
__FILE__, __LINE__)), smb_panic("assert failed")))
gives this diagnostic
2067** 1081: A void object is referenced in a context where a valid object
is
required; an object of type int is assumed.
for this generated code.
1081 SMB_ASSERT(len < 80);
== ((len < 80)?(void)0: ((void)( (DEBUGLEVEL >= (0)) && (dbghdr( 0,
("ut
I have modified the Samba code as follows to make the diagnostics go away.
#ifdef VOS
#define SMB_ASSERT(b) ((b)?0: \
(DEBUG(0,("PANIC: assert failed at %s(%d)\n", \
__FILE__, __LINE__)), smb_panic("assert failed")))
#else
#define SMB_ASSERT(b) ((b)?(void)0: \
(DEBUG(0,("PANIC: assert failed at %s(%d)\n", \
__FILE__, __LINE__)), smb_panic("assert failed")))
#endif
Does everyone else compile this ok?
If you do, can you suggest what I tell the compiler guy in order to get it
fixed? (It's NOT gcc)
Thanks,
Ron
More information about the samba-technical
mailing list