From: Francis Deslauriers Date: Tue, 3 Dec 2019 21:07:44 +0000 (-0500) Subject: Cleanup: silence unused parameter `ps` warning X-Git-Tag: v2.13.0-rc1~545 X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=d8eba881c802082f3c775f00f115b2273b30a641 Cleanup: silence unused parameter `ps` warning This function was copied here from one of the BSDs by this commit: e5bc3b0f4d6c0407492ebdea863483925393e1bc with the /*ARGSUSED*/ lint-style comment to prevent any `unused` warning. It seems clang doesn't support those lint-style comments, so it prints this warning: CC libustsnprintf_la-core.lo mbrtowc_sb.c:39:68: error: unused parameter 'ps' [-Werror,-Wunused-parameter] ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) So mark that parameter as unused to prevent any warning. We could also simply remove the unused parameter and change the signature of the function. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I09f4fd3938058ed985c1525d8b9b06a27529691e --- diff --git a/snprintf/mbrtowc_sb.c b/snprintf/mbrtowc_sb.c index 0abecc8e..3a81931f 100644 --- a/snprintf/mbrtowc_sb.c +++ b/snprintf/mbrtowc_sb.c @@ -36,7 +36,8 @@ /*ARGSUSED*/ size_t -ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) +ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n, + mbstate_t *ps __attribute__((unused))) { /* pwc may be NULL */