kopia lustrzana https://github.com/Hamlib/Hamlib
Quell compiler warnings in test programs
rodzic
212f2c97b2
commit
2f8b6c8d51
|
@ -1,5 +1,5 @@
|
|||
|
||||
/*
|
||||
/*
|
||||
* Very simple test program to check BCD convertion against some other --SF
|
||||
* This is mainly to test freq2bcd and bcd2freq functions.
|
||||
*/
|
||||
|
@ -33,14 +33,14 @@ int main (int argc, char *argv[])
|
|||
if (digits > MAXDIGITS)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
printf("Little Endian mode\n");
|
||||
printf("Frequency: %"PRIfreq"\n",f);
|
||||
to_bcd(b, f, digits);
|
||||
printf("BCD: %2.2x",b[0]);
|
||||
for (i = 1; i < (digits+1)/2; i++)
|
||||
printf(",%2.2x",b[i]);
|
||||
printf("\nResult after recoding: %"SCNll"\n", from_bcd(b, digits));
|
||||
printf("\nResult after recoding: %llu\n", from_bcd(b, digits));
|
||||
|
||||
printf("\nBig Endian mode\n");
|
||||
printf("Frequency: %"PRIfreq"\n",f);
|
||||
|
@ -48,7 +48,7 @@ int main (int argc, char *argv[])
|
|||
printf("BCD: %2.2x",b[0]);
|
||||
for (i = 1; i < (digits+1)/2; i++)
|
||||
printf(",%2.2x",b[i]);
|
||||
printf("\nResult after recoding: %"SCNll"\n", from_bcd_be(b, digits));
|
||||
printf("\nResult after recoding: %llu\n", from_bcd_be(b, digits));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
/*
|
||||
/*
|
||||
* Very simple test program to check freq convertion --SF
|
||||
* This is mainly to test kHz, MHz, GHz macros and int64_t support.
|
||||
*/
|
||||
|
@ -28,11 +28,11 @@ int main (int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
printf("%s\n", hamlib_version);
|
||||
printf("caps size: %d\n", sizeof(struct rig_caps));
|
||||
printf("state size: %d\n", sizeof(struct rig_state));
|
||||
printf("RIG size: %d\n", sizeof(struct rig));
|
||||
printf("freq_t size: %d\n", sizeof(freq_t));
|
||||
printf("shortfreq_t size: %d\n", sizeof(shortfreq_t));
|
||||
printf("caps size: %lu\n", sizeof(struct rig_caps));
|
||||
printf("state size: %lu\n", sizeof(struct rig_state));
|
||||
printf("RIG size: %lu\n", sizeof(struct rig));
|
||||
printf("freq_t size: %lu\n", sizeof(freq_t));
|
||||
printf("shortfreq_t size: %lu\n", sizeof(shortfreq_t));
|
||||
|
||||
/* freq on 31bits test */
|
||||
f = GHz(2);
|
||||
|
|
Ładowanie…
Reference in New Issue