mirror of https://github.com/wb2osz/direwolf.git
Debian is _picky_. Fixed a few warnings.
This commit is contained in:
parent
16d102e601
commit
f20fcd0e61
11
src/bch.c
11
src/bch.c
|
@ -77,7 +77,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include "bch.h"
|
||||
|
||||
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)
|
|||
{
|
||||
register int i, j, u, q, t2, count = 0, syn_error = 0;
|
||||
int elp[1026][1024], d[1026], l[1026], u_lu[1026], s[1025];
|
||||
int root[200], loc[200], reg[201];
|
||||
int loc[200], reg[201];
|
||||
|
||||
t2 = 2 * bch->t;
|
||||
|
||||
|
@ -456,9 +456,9 @@ int apply_bch(const bch_t *bch, int *recd)
|
|||
d[u + 1] = bch->alpha_to[s[u + 1]];
|
||||
else
|
||||
d[u + 1] = 0;
|
||||
for (i = 1; i <= l[u + 1]; i++)
|
||||
if ((s[u + 1 - i] != -1) && (elp[u + 1][i] != 0))
|
||||
d[u + 1] ^= bch->alpha_to[(s[u + 1 - i]
|
||||
for (i = 1; i <= l[u + 1]; i++)
|
||||
if ((s[u + 1 - i] != -1) && (elp[u + 1][i] != 0))
|
||||
d[u + 1] ^= bch->alpha_to[(s[u + 1 - i]
|
||||
+ bch->index_of[elp[u + 1][i]]) % bch->n];
|
||||
/* put d[u+1] into index form */
|
||||
d[u + 1] = bch->index_of[d[u + 1]];
|
||||
|
@ -491,7 +491,6 @@ int apply_bch(const bch_t *bch, int *recd)
|
|||
}
|
||||
if (!q) { /* store root and error
|
||||
* location number indices */
|
||||
root[count] = i;
|
||||
loc[count] = bch->n - i;
|
||||
count++;
|
||||
#ifdef BCH_DEBUG
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,7 +34,7 @@
|
|||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "textcolor.h"
|
||||
|
@ -424,11 +424,11 @@ void eotd_to_text (unsigned char *eotd, int eotd_len, char *text, int text_size)
|
|||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
struct tm *now = localtime(&tv.tv_sec);
|
||||
char date_buffer[32];
|
||||
char date_buffer[128];
|
||||
strlcat(text, "ts=", text_size);
|
||||
sprintf(date_buffer, "%d-%02d-%02dT%02d:%02d:%02d.%03d,",
|
||||
sprintf(date_buffer, "%4d-%02d-%02dT%02d:%02d:%02d.%03d,",
|
||||
now->tm_year + 1900, now->tm_mon + 1, now->tm_mday,
|
||||
now->tm_hour, now->tm_min, now->tm_sec, tv.tv_usec / 1000);
|
||||
now->tm_hour, now->tm_min, now->tm_sec, (int) (tv.tv_usec / 1000));
|
||||
strlcat(text, date_buffer, text_size);
|
||||
#endif
|
||||
|
||||
|
@ -453,7 +453,6 @@ void eotd_to_text (unsigned char *eotd, int eotd_len, char *text, int text_size)
|
|||
#ifdef EOTD_APPEND_HEX
|
||||
char hex[64];
|
||||
add_comma(text, text_size);
|
||||
snprintf(hex, sizeof(hex), "%llx", pkt);
|
||||
strlcat(text, "hex=", text_size);
|
||||
for (int i = 56; i >= 0; i -= 8) {
|
||||
sprintf(hex, "%02x ", (unsigned char) (pkt >> i) & 0xff);
|
||||
|
|
|
@ -346,7 +346,7 @@ void multi_modem_process_rec_frame (int chan, int subchan, int slice, unsigned c
|
|||
else if (save_audio_config_p->achan[chan].modem_type == MODEM_EOTD) {
|
||||
char text[1024];
|
||||
eotd_to_text (fbuf, flen, text, sizeof(text));
|
||||
char monfmt[1024];
|
||||
char monfmt[2048];
|
||||
snprintf (monfmt, sizeof(monfmt), "EOTD>%s%1d%1d:{%c%c%s", APP_TOCALL, MAJOR_VERSION, MINOR_VERSION, USER_DEF_USER_ID, USER_DEF_TYPE_EOTD, text);
|
||||
pp = ax25_from_text (monfmt, 1);
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue