In pq_common.hxx there is:
#ifdef UNUSED
#elif defined(__GNUC__)
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
#elif defined(__LCLINT__)
# define UNUSED(x) /*@unused@*/ x
#else
# define UNUSED(x) x
#endif
and then UNUSED is used like this (just in two places (so far, I guess
the intent is to use it more?)):
pointer allocate (size_type n, const void* UNUSED(hint) = 0)
Sure, it silences warnings from gcc. But MSVC still warns. We do want
to eventually be warning-free with MSVC, too, don't we? Don't we
already have a convention how to handle unused parameters in C++ code,
i.e. comment their name out?
--tml
Context
- Counter-productive UNUSED macro in connectivity/source/drivers/postgresql · Tor Lillqvist
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.