Skip to content

Commit f20fcd0

Browse files
committed
Debian is _picky_. Fixed a few warnings.
1 parent 16d102e commit f20fcd0

File tree

5 files changed

+1396
-12
lines changed

5 files changed

+1396
-12
lines changed

Diff for: src/bch.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#include <stdio.h>
7878
#include <stdlib.h>
7979
#include <string.h>
80-
#include <stdint.h>
80+
#include <inttypes.h>
8181
#include "bch.h"
8282

8383
int init_bch(bch_t *bch, int m, int length, int t) {
@@ -344,7 +344,7 @@ int apply_bch(const bch_t *bch, int *recd)
344344
{
345345
register int i, j, u, q, t2, count = 0, syn_error = 0;
346346
int elp[1026][1024], d[1026], l[1026], u_lu[1026], s[1025];
347-
int root[200], loc[200], reg[201];
347+
int loc[200], reg[201];
348348

349349
t2 = 2 * bch->t;
350350

@@ -456,9 +456,9 @@ int apply_bch(const bch_t *bch, int *recd)
456456
d[u + 1] = bch->alpha_to[s[u + 1]];
457457
else
458458
d[u + 1] = 0;
459-
for (i = 1; i <= l[u + 1]; i++)
460-
if ((s[u + 1 - i] != -1) && (elp[u + 1][i] != 0))
461-
d[u + 1] ^= bch->alpha_to[(s[u + 1 - i]
459+
for (i = 1; i <= l[u + 1]; i++)
460+
if ((s[u + 1 - i] != -1) && (elp[u + 1][i] != 0))
461+
d[u + 1] ^= bch->alpha_to[(s[u + 1 - i]
462462
+ bch->index_of[elp[u + 1][i]]) % bch->n];
463463
/* put d[u+1] into index form */
464464
d[u + 1] = bch->index_of[d[u + 1]];
@@ -491,7 +491,6 @@ int apply_bch(const bch_t *bch, int *recd)
491491
}
492492
if (!q) { /* store root and error
493493
* location number indices */
494-
root[count] = i;
495494
loc[count] = bch->n - i;
496495
count++;
497496
#ifdef BCH_DEBUG

0 commit comments

Comments
 (0)