kgoba / ft8_lib

FT8 library
MIT License
201 stars 67 forks source link

fix compile error and warnings on ubuntu #42

Open AlexandreVaughan opened 2 months ago

AlexandreVaughan commented 2 months ago

Fixes this error (compiled on ubuntu linux 22.04):

demo/decode_ft8.c:347:31: error: ‘CLOCK_REALTIME’ undeclared (first use in this function)
  347 |                 clock_gettime(CLOCK_REALTIME, &spec);

Also fixes these warnings:

warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  122 |     fread((void*)raw_data, blockAlign, *num_samples, f);

warning: implicit declaration of function ‘stpcpy’; did you mean ‘strcpy’? [-Wimplicit-function-declaration]
  953 |             dst = stpcpy(dst, "R ");

warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
  423 |     LOG(LOG_DEBUG, "decode_nonstd() n12=%04x n58=%08llx iflip=%d nrpt=%d icq=%d i3=%d\n", n12, n58, iflip, nrpt, icq, i3);

Also added a bunch of files to the gitignore list.