kopia lustrzana https://github.com/Guenael/rtlsdr-wsprd
chore(compiler): trying clang, why not...
rodzic
c8576a067e
commit
de213f1bfe
4
Makefile
4
Makefile
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS= -Wall -O3 -ffast-math -std=gnu17
|
||||
CC = clang
|
||||
CFLAGS= -O3 -std=gnu17 -Wall
|
||||
LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm
|
||||
|
||||
OBJS = rtlsdr_wsprd.o wsprd/wsprd.o wsprd/wsprsim_utils.o wsprd/wsprd_utils.o wsprd/tab.o wsprd/fano.o wsprd/nhash.o
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
|
||||
|
||||
/* snprintf possible truncation allowed to prevent possible buffer overflow */
|
||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||
// Testing clang
|
||||
// #pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||
|
||||
|
||||
/* Sampling definition for RTL devices */
|
||||
|
|
|
@ -629,12 +629,12 @@ int32_t wspr_decode(float *idat, float *qdat, uint32_t npoints,
|
|||
int32_t idrift, ifr, if0, ifd, k0;
|
||||
int32_t kindex;
|
||||
float smax, ss, pow, p0, p1, p2, p3;
|
||||
for(j=0; j<npk; j++) { //For each candidate...
|
||||
for(j=0; j<npk; j++) { //For each candidate...
|
||||
smax = -1e30;
|
||||
if0 = freq0[j]/(DF/2.0)+NSPERSYM;
|
||||
for (ifr=if0-1; ifr<=if0+1; ifr++) { //Freq search
|
||||
for( k0=-10; k0<22; k0++) { //Time search
|
||||
for (idrift =- maxdrift; idrift<=maxdrift; idrift++) { //Drift search
|
||||
for (ifr=if0-1; ifr<=if0+1; ifr++) { //Freq search
|
||||
for( k0=-10; k0<22; k0++) { //Time search
|
||||
for (idrift = -maxdrift; idrift <= maxdrift; idrift++) { //Drift search
|
||||
ss = 0.0;
|
||||
pow = 0.0;
|
||||
for (k=0; k<NSYM; k++) { //Sum over symbols
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
#include "./wsprd_utils.h"
|
||||
|
||||
// FIXME -- Replace strcpy & strncpy by strcpy to prevent possible buffer overflow
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
//#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
//#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
|
||||
|
||||
void unpack50(signed char *dat, int32_t *n1, int32_t *n2) {
|
||||
|
@ -320,7 +320,7 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *call, c
|
|||
strncat(pwr, "\0", 1);
|
||||
}
|
||||
} else if ( ntype < 0 ) {
|
||||
ndbm =- (ntype+1);
|
||||
ndbm = -(ntype+1);
|
||||
memset(grid6, 0, sizeof(char)*7);
|
||||
strncat(grid6, callsign+5, 1);
|
||||
strncat(grid6, callsign, 5);
|
||||
|
|
Ładowanie…
Reference in New Issue