Skip to contentSkip to conversation

2017.11.x: fix refpolicy build failure

PATCH New Adam Duskett 2 participants 4 messages Feb 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 2017.11.x: fix refpolicy build failure

Add a patch to fix the fallthrough.

Taken from upstream:
https://github.com/TresysTechnology/refpolicy/commit/89b53fafa9904ba7a3df2ad94d01a485eae5366f

Fixes:
http://autobuild.buildroot.net/results/54e240243aba31da33a2cbecdcc234b44f24dcf7

---
Changes v1 -> v2:
- Added upstream commit link to the patch notes (Matthew Weber)
- Changed patch to full upstream patch.

 .../refpolicy/0002-fix-fall-through-error.patch    | 48 ++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 package/refpolicy/0002-fix-fall-through-error.patch
package/refpolicy/0002-fix-fall-through-error.patch new file +48 -0
new file mode 100644
index 0000000000..d147507bac
@@ -0,0 +1,48 @@
+From 60a0fad3daebaa8fda5b79817b1b6e9cb01a1ad1 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Tue, 6 Feb 2018 12:12:36 -0500
+Subject: [PATCH] fc_sort: avoid compiler warning/error
+
+Fix a "-Werror=implicit-fallthrough" compiler warning/error on
+the switch statement.
+
+This third version (v3) fixes a bug introduced in the first
+version and improves the style over the second version.
+
+Upstream Commit:
+https://github.com/TresysTechnology/refpolicy/commit/89b53fafa9904ba7a3df2ad94d01a485eae5366f
+
+Signed-off-by: Guido Trentalancia <[email protected]>
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ support/fc_sort.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/support/fc_sort.c b/support/fc_sort.c
+index 5561288..66cdf39 100644
+--- a/support/fc_sort.c
++++ b/support/fc_sort.c
+@@ -292,14 +292,16 @@ void fc_fill_data(file_context_node_t *fc_node)
+ 			/* If a escape character is found,
+ 			 *  skip the next character. */
+ 			c++;
++			break;
+ 		default:
+-			/* If no meta character has been found yet,
+-			 *  add one to the stem length. */
+-			if (!fc_node->meta)
+-				fc_node->stem_len++;
+ 			break;
+ 		}
+ 
++		/* If no meta character has been found yet,
++		 * add one to the stem length. */
++		if (!fc_node->meta)
++			fc_node->stem_len++;
++
+ 		fc_node->str_len++;
+ 		c++;
+ 	}
+-- 
+2.14.3
+
Signature · 1 line
2.14.3
#1 lore raw

PATCH v2 1/1 2017.11.x: fix refpolicy build failure

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Adam" == Adam Duskett <[email protected]> writes:

Add a patch to fix the fallthrough.
Taken from upstream:
https://github.com/TresysTechnology/refpolicy/commit/89b53fafa9904ba7a3df2ad94d01a485eae5366f

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/54e240243aba31da33a2cbecdcc234b44f24dcf7

---
Changes v1 -> v2:
- Added upstream commit link to the patch notes (Matthew Weber)
- Changed patch to full upstream patch.

Ehh, isn't this already fixed by this:
https://git.buildroot.net/buildroot/commit/?h=2017.11.x&id=c8eea94905a0dc2851e92673a3a7697eb5dc4355

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH v2 1/1 2017.11.x: fix refpolicy build failure

Peter;

Quoted 14 lines · Peter Korsgaard
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Adam" == Adam Duskett <[email protected]> writes:

Add a patch to fix the fallthrough.
Taken from upstream:
https://github.com/TresysTechnology/refpolicy/commit/89b53fafa9904ba7a3df2ad94d01a485eae5366f

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/54e240243aba31da33a2cbecdcc234b44f24dcf7

---
Changes v1 -> v2:
- Added upstream commit link to the patch notes (Matthew Weber)
- Changed patch to full upstream patch.

Quoted 5 lines

Ehh, isn't this already fixed by this:
https://git.buildroot.net/buildroot/commit/?h=2017.11.x&id=c8eea94905a0dc2851e92673a3a7697eb5dc4355

--
Bye, Peter Korsgaard

I didn't see that you had submitted and approved this patch. This patch was submitted after your initial comment to the first patch.

#3 lore raw

PATCH v2 1/1 2017.11.x: fix refpolicy build failure

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Adam" == Adam Duskett <[email protected]> writes:

Hi,

Quoted 7 lines
Quoted 5 lines

Ehh, isn't this already fixed by this:
https://git.buildroot.net/buildroot/commit/?h=2017.11.x&id=c8eea94905a0dc2851e92673a3a7697eb5dc4355

--
Bye, Peter Korsgaard

I didn't see that you had submitted and approved this patch.

Ohh, I had CC'ed you on the mail though.

Quoted 1 line

This patch was submitted after your initial comment to the first patch.

I think you are mixing me up with Matt. I did not comment on your patch.

Signature · 1 line
Bye, Peter Korsgaard