Around 22 o'clock on Sep 25, "Mike A. Harris" wrote:
> (void) sprintf(openLicenseString, "%s:%d",
> LICENSE_METHOD_OPEN,
> OPEN_LICENSE_VERSION);
> openLicenseMethod = XInternAtom(dpy, openLicenseString, True);
>
> Since the return code of sprintf is not actually used for
> anything... what is the purpose of casting it to void?
Casting to void tells the compiler you *know* you're not looking at the
result. As sprintf does generate one, the compiler can emit a warning when
the code fails to use it. This might help reduce the number of untested
error returns. Or increase the number of (void) casts, which doesn't seem
like a feature either.
[EMAIL PROTECTED] XFree86 Core Team SuSE, Inc.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert