[PATCH] libasn1c[master]: fix compiler warning: drop dead code from BIT_STRING_fromBuf()

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Oct 28 02:31:22 UTC 2017


Review at  https://gerrit.osmocom.org/4492

fix compiler warning: drop dead code from BIT_STRING_fromBuf()

The warning is, on FreeBSD,

  CC       asn1helpers.lo
asn1helpers.c:68:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
        if (len < 0)
            ~~~ ^ ~

Change-Id: I80867da697d744d7ef4d70c8f24031f5781fb11a
---
M src/asn1helpers.c
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/92/4492/1

diff --git a/src/asn1helpers.c b/src/asn1helpers.c
index a4ced70..4e5e08d 100644
--- a/src/asn1helpers.c
+++ b/src/asn1helpers.c
@@ -65,9 +65,6 @@
 		return 0;
 	}
 
-	if (len < 0)
-		len = strlen((char*)str);
-
 	buf = MALLOC(len);
 	if (!buf) {
 		errno = ENOMEM;

-- 
To view, visit https://gerrit.osmocom.org/4492
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80867da697d744d7ef4d70c8f24031f5781fb11a
Gerrit-PatchSet: 1
Gerrit-Project: libasn1c
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list