Skip to content

Commit

Permalink
Quell compiler warnings in test programs
Browse files Browse the repository at this point in the history
  • Loading branch information
N0NB committed May 8, 2013
1 parent 212f2c9 commit 2f8b6c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions tests/testbcd.c
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down Expand Up @@ -33,22 +33,22 @@ 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);
to_bcd_be(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_be(b, digits));
printf("\nResult after recoding: %llu\n", from_bcd_be(b, digits));

return 0;
}
12 changes: 6 additions & 6 deletions tests/testfreq.c
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2f8b6c8

Please sign in to comment.