From: Scott Murray Date: Mon, 12 Jul 2021 19:51:18 +0000 (-0400) Subject: gcc 11.x fixes X-Git-Tag: 12.90.1^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=c5c15f86d2eaaa5ac72f0ac00634a978326daae9;hp=c5c15f86d2eaaa5ac72f0ac00634a978326daae9;p=src%2Fapp-framework-binder.git gcc 11.x fixes Changes for compiling with gcc 11.x: - g++ now seems to instantiate duplicate entries for the set member function in the contextclass template class in binding-wrap.hpp. The use of a closure as a default argument value seems to be the culprit, as it seems there are longstanding issues with respect to using closures like that and resulting symbol names (i.e. the use of a closure isn't necessarily recognized as generating unique instantiations). In theory, C++17 should explicitly allow this when the closure has no captures, but bumping up to -std=gnu++17 did not fix the issue. To avoid it, replace the closure usage with a private static member function. - In afb-hook.c, tweaked the ignoring of the writev return code to make the stricter checking in gcc 11 happy. - In decode_base64 in wrap-json.c, initialize u16 as gcc now seems to miss that it will be initialized on the first loop iteration. Bug-AGL: SPEC-3819 Signed-off-by: Scott Murray Change-Id: I8876db196b46cc35ecd2798e20d5ec3425df865e ---