Cute error in client/smbmount.c

Urban Widmark urban at teststation.com
Fri Mar 9 20:08:47 GMT 2001


On Fri, 9 Mar 2001, Tassos Bassoukos wrote:

> client/smbmount.c: In function `parse_mount_smb':
> client/smbmount.c:764: `__ERROR__XX__NEVER_USE_SNPRINTF___' undeclared
>                        (first use in this function)
> client/smbmount.c:764: (Each undeclared identifier is reported only once
> client/smbmount.c:764: for each function it appears in.)

Yes, I saw this last night. It's a change from 2.2.0-alpha2. I have a
patch for it, but that also contains some docbook updates that I want to
verify first.

You should be able to get it to compile by changing snprintf to slprintf.


A question to the list, why this warning for snprintf but not for 
slprintf?

As far as I can tell
	snprintf(buf, n, ...)
is equivalent to
	slprintf(buf, n, ...)
except for the returnvalue which 99% of the callers ignore. So why the big
warning? C libraries with buggy snprintf implementations?

/Urban





More information about the samba-technical mailing list