gsm: Address compiler warning about unused variable 'z'
The comment explains why we don't care about the content of z,
stop storing it.
gsm_utils.c: In function 'gsm_7bit_encode':
gsm_utils.c:253:13: warning: variable 'z' set but not used [-Wunused-but-set-variable]
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index 8d072a1..3f3a73f 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -250,16 +250,17 @@
/* GSM 03.38 6.2.1 Character packing */
int gsm_7bit_encode(uint8_t *result, const char *data)
{
- int y = 0, z = 0;
+ int y = 0;
+
/* prepare for the worst case, every character expanding to two bytes */
uint8_t *rdata = calloc(strlen(data) * 2, sizeof(uint8_t));
y = gsm_septet_encode(rdata, data);
- z = gsm_septets2octets(result, rdata, y, 0);
+ gsm_septets2octets(result, rdata, y, 0);
free(rdata);
/*
- * We don't care about the number of octets (z), because they are not
+ * We don't care about the number of octets, because they are not
* unique. E.g.:
* 1.) 46 non-extension characters + 1 extension character
* => (46 * 7 bit + (1 * (2 * 7 bit))) / 8 bit = 42 octets