Change in osmo-pcu[master]: Clean false positive in newer GCC version checking guard of else clause

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed May 19 10:56:10 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/24265 )


Change subject: Clean false positive in newer GCC version checking guard of else clause
......................................................................

Clean false positive in newer GCC version checking guard of else clause

Got this today with newer gcc (11.1.0) after system upgrade:
egprs_rlc_compression.cpp:693:9: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]

The indentation was indeed wrong, provoking a warning in GCC. From code
flow point of view, however, the previous state was fine too, so no
logical change is involved in this commit.

Change-Id: I37bfc8e85daaabbbf10dfd907b305e3e0ec31863
---
M src/egprs_rlc_compression.cpp
1 file changed, 3 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/65/24265/1

diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp
index 8f4fd87..fae529c 100644
--- a/src/egprs_rlc_compression.cpp
+++ b/src/egprs_rlc_compression.cpp
@@ -690,8 +690,7 @@
 	if (clen >= uclen)
 		/* No Gain is observed, So no need to compress */
 		return 0;
-	else
-		LOGP(DRLCMACUL, LOGL_DEBUG, "CRBB bitmap = %s\n", osmo_hexdump(crbb_vec->data, (crbb_vec->cur_bit+7)/8));
-		/* Add compressed bitmap to final buffer */
-		return 1;
+	LOGP(DRLCMACUL, LOGL_DEBUG, "CRBB bitmap = %s\n", osmo_hexdump(crbb_vec->data, (crbb_vec->cur_bit+7)/8));
+	/* Add compressed bitmap to final buffer */
+	return 1;
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/24265
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37bfc8e85daaabbbf10dfd907b305e3e0ec31863
Gerrit-Change-Number: 24265
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210519/31a9e664/attachment.htm>


More information about the gerrit-log mailing list