diff options
Diffstat (limited to 'meta-oe/recipes-extended/indent')
-rw-r--r-- | meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch | 79 | ||||
-rw-r--r-- | meta-oe/recipes-extended/indent/indent_2.2.12.bb | 5 |
2 files changed, 82 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch b/meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch new file mode 100644 index 0000000000..5a474cf0fc --- /dev/null +++ b/meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch @@ -0,0 +1,79 @@ +From 5af65ce9674a69054c9a8405e51794c6f3ca41df Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 4 Jun 2021 12:34:18 -0700 +Subject: [PATCH] Remove dead paren_level code + +Local variable `paren_level' in src/output.c:dump_line_code() is +initialized to 0, then incremented with count_parens() return +value, and then the variable is never used. Also count_parens() +has no side effect. Thus this patch removes this useless code. + +Upstream-Status: Submitted [https://mail.gnu.org/archive/html/bug-indent/2011-04/msg00000.html] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/output.c | 35 ----------------------------------- + 1 file changed, 35 deletions(-) + +diff --git a/src/output.c b/src/output.c +index ee01bcc..5b92167 100644 +--- a/src/output.c ++++ b/src/output.c +@@ -798,37 +798,6 @@ static int dump_line_label(void) + return cur_col; + } + +-/** +- * +- */ +- +-static int count_parens( +- const char * string) +-{ +- int paren_level = 0; +- +- while (*string) +- { +- switch (*string) +- { +- case '(': +- case '[': +- paren_level++; +- break; +- case ')': +- case ']': +- paren_level--; +- break; +- default: +- break; +- } +- +- string++; +- } +- +- return paren_level; +-} +- + /** + * + */ +@@ -840,8 +809,6 @@ static void dump_line_code( + BOOLEAN * pbreak_line, + int target_col_break) + { +- int paren_level = 0; +- + if (s_code != e_code) + { /* print code section, if any */ + int i; +@@ -928,8 +895,6 @@ static void dump_line_code( + + *pcur_col = count_columns (*pcur_col, s_code, NULL_CHAR); + +- paren_level += count_parens(s_code); +- + s_code[buf_break->offset] = c; + + *pnot_truncated = 0; +-- +2.31.1 + diff --git a/meta-oe/recipes-extended/indent/indent_2.2.12.bb b/meta-oe/recipes-extended/indent/indent_2.2.12.bb index 90ba8a2e65..1a7d61abc0 100644 --- a/meta-oe/recipes-extended/indent/indent_2.2.12.bb +++ b/meta-oe/recipes-extended/indent/indent_2.2.12.bb @@ -7,7 +7,7 @@ to a different one. Indent understands correct C syntax and tries to handle \ incorrect C syntax. \ Install the indent package if you are developing applications in C and \ you want a program to format your code." -LICENSE = "GPLv3" +LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "virtual/gettext" @@ -16,12 +16,13 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://0001-src-indent.c-correct-the-check-for-locale.h.patch \ file://0001-Makefile.am-remove-regression-dir.patch \ file://0001-Fix-builds-with-recent-gettext.patch \ + file://0001-Remove-dead-paren_level-code.patch \ " SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14" SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b" inherit autotools gettext texinfo -CFLAGS_append_class-native = " -Wno-error=unused-value" +CFLAGS:append:class-native = " -Wno-error=unused-value" BBCLASSEXTEND = "native" |