head 1.2; access; symbols pkgsrc-2024Q1:1.1.0.20 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.18 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.16 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.14 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.12 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.10 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.8 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.6 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.4 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.2 pkgsrc-2021Q4-base:1.1; locks; strict; comment @// @; 1.2 date 2024.06.05.06.40.59; author nia; state dead; branches; next 1.1; commitid 9HDU644QOLsEeLcF; 1.1 date 2021.11.18.15.33.16; author nia; state Exp; branches; next ; commitid 8I27Ab7kKVFE4ihD; desc @@ 1.2 log @gc old unbuildable thunderbirds @ text @$NetBSD: patch-mozilla_js_xpconnect_src_XPCWrappedNative.cpp,v 1.1 2021/11/18 15:33:16 nia Exp $ Avoid error when compiling with gcc 9: XPCWrappedNative.cpp:2221:41: error: '%s' directive argument is null [-Werror=format-overflow=] 2221 | name = JS_sprintf_append(name, fmt, | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~ 2222 | array[i]->GetNameString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ --- mozilla/js/xpconnect/src/XPCWrappedNative.cpp.orig 2018-07-09 19:54:43.000000000 +0000 +++ mozilla/js/xpconnect/src/XPCWrappedNative.cpp @@@@ -2218,8 +2218,10 @@@@ XPCWrappedNative::ToString(XPCWrappedNat const char* fmt = (i == 0) ? "(%s" : (i == count-1) ? ", %s)" : ", %s"; - name = JS_sprintf_append(name, fmt, - array[i]->GetNameString()); + const char *s = array[i]->GetNameString(); + if (s == NULL) + s = "-"; + name = JS_sprintf_append(name, fmt, s); } } } @ 1.1 log @thunderbird52: Various fixes for gcc>7 from firefox52 @ text @d1 1 a1 1 $NetBSD$ @