From 008bc84f7535dd48412dfc660281677c5ac392d2 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 22 Dec 2020 11:15:12 +0900 Subject: [PATCH] DEB uncrustify: backported commit 45681e88 from upstream git repository. This fixes FTBFS on ppcel and armxx archs. Upstream commit message: ----------------------------------------------------------- Author: Joshua Parker Date: Mon Nov 9 13:44:57 2020 -0600 Fix issue #2976 This commit modifies output_parsed_csv() in an attempt to address issue #2976, where on some platforms the behavior may be different with regard to printing c-style multi-line comment strings within the debug csv output M src/output.cpp M tests/cli/output/class_enum_struct_union.csv ----------------------------------------------------------- Signed-off-by: Michele Calgaro --- .../debian/patches/005_upstream_45681e88.diff | 30 +++++++++++++++++++ .../debian/patches/series | 1 + 2 files changed, 31 insertions(+) create mode 100644 debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/005_upstream_45681e88.diff diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/005_upstream_45681e88.diff b/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/005_upstream_45681e88.diff new file mode 100644 index 00000000..f4d8cb3b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/005_upstream_45681e88.diff @@ -0,0 +1,30 @@ +Backported commit 45681e88 from upstream git repository. This fixes FTBFS on ppcel and armxx archs. +--- a/src/output.cpp ++++ b/src/output.cpp +@@ -544,11 +544,7 @@ + { + for (auto *ch = pc->text(); *ch != '\0'; ++ch) + { +- if ( *ch > 0 +- || !chunk_is_token(pc, CT_COMMENT_MULTI)) +- { +- fprintf(pfile, "%c", *ch); +- } ++ fprintf(pfile, "%c", *ch); + + if (*ch == '"') + { +--- a/tests/cli/output/class_enum_struct_union.csv ++++ b/tests/cli/output/class_enum_struct_union.csv +@@ -1,9 +1,9 @@ + number of loops,4, + language,CPP, + Line,Tag,Parent_type,Type of the parent,Column,Orig Col Strt,Orig Col End,Orig Sp Before,Br,Lvl,pp,Flags,Nl Before,Nl After,Text, +-1,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,3,0,0,0,"",9,0," /** * the enum (and variable declarations thereof) could be of * the following forms: * * ""enum type [: integral_type] { ... } [x, ...]"" * ""enum type [: integral_type]"" * ""enum class type [: integral_type] { ... } [x, ...]"" * ""enum class type [: integral_type]"" * ""enum [: integral_type] { ... } x, ..."" */" ++1,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,3,0,0,0,"",9,0," /**␤ * the enum (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * ""enum type [: integral_type] { ... } [x, ...]""␤ * ""enum type [: integral_type]""␤ * ""enum class type [: integral_type] { ... } [x, ...]""␤ * ""enum class type [: integral_type]""␤ * ""enum [: integral_type] { ... } x, ...""␤ */" + 10,NEWLINE,NONE,PARENT_NOT_SET,7,7,4,0,0,0,0,"",2,0, +-12,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,0,0,0,0,"",9,0," /** * the class/struct (and variable declarations thereof) could be of * the following forms: * * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { } * template<...> class/struct[<...>] [macros/attributes ...] type * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...] * class/struct [macros/attributes ...] type [x, ...] * class/struct [macros/attributes ...] [: bases] { } x, ... */" ++12,COMMENT_MULTI,COMMENT_WHOLE,PARENT_NOT_SET,1,4,7,0,0,0,0,"",9,0," /**␤ * the class/struct (and variable declarations thereof) could be of␤ * the following forms:␤ *␤ * template<...> class/struct[<...>] [macros/attributes ...] type [: bases ...] { }␤ * template<...> class/struct[<...>] [macros/attributes ...] type␤ * class/struct[ [macros/attributes ...] type [: bases ...] { } [x, ...]␤ * class/struct [macros/attributes ...] type [x, ...]␤ * class/struct [macros/attributes ...] [: bases] { } x, ...␤ */" + 21,NEWLINE,NONE,PARENT_NOT_SET,7,7,1,0,0,0,0,"",2,0, + 23,PREPROC,PP_DEFINE,PARENT_NOT_SET,1,1,2,0,1,1,0,"IN_PREPROC,STMT_START,EXPR_START,DONT_INDENT,PUNCTUATOR",0,0," #" + 23,PP_DEFINE,NONE,PARENT_NOT_SET,2,2,8,0,1,1,0,"IN_PREPROC,FORCE_SPACE",0,0," define" diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/series b/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/series index 383a9d11..de7beae0 100644 --- a/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/series +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/debian/patches/series @@ -2,3 +2,4 @@ 002_trinity_customization.diff 003_allow_older_distributions.diff 004_fixed_usage.diff +005_upstream_45681e88.diff