# HG changeset patch # User Matti Hamalainen # Date 1544439329 -7200 # Node ID 8cd0122609765bbc28a06ba2f89d61f7df5d2c44 # Parent 1ad8382e36708b439dbe5221f534aa52fe1ecb7f Fix a bunch of warnings. diff -r 1ad8382e3670 -r 8cd012260976 tests/encbr1test.c --- a/tests/encbr1test.c Wed Dec 05 17:43:08 2018 +0200 +++ b/tests/encbr1test.c Mon Dec 10 12:55:29 2018 +0200 @@ -35,7 +35,9 @@ if (count <= 0) return TRUE; + #if BR_DEBUG != 0 || defined(BR_WRITE) Uint8 tmp = count - 1; + #endif #if BR_DEBUG == 2 printf("L: %02x ", tmp); @@ -52,6 +54,8 @@ if (!dmf_write_byte(fp, tmp) || !dmf_write_str(fp, buf + offs, count)) return FALSE; + #else + (void) fp; #endif return TRUE; @@ -65,8 +69,10 @@ if (count <= 0) return TRUE; + #if BR_DEBUG != 0 || defined(BR_WRITE) Uint8 tmp = ((Uint8) count - 2) ^ 0xff; Uint8 data = buf[offs]; + #endif #if BR_DEBUG == 2 printf("R: %02x %02x [%" DM_PRIu_SIZE_T "]\n", tmp, data, count); @@ -74,10 +80,13 @@ mprintbyte(tmp); mprintbyte(data); #endif + #ifdef BR_WRITE if (!dmf_write_byte(fp, tmp) || !dmf_write_byte(fp, data)) return FALSE; + #else + (void) fp; #endif return TRUE; @@ -221,7 +230,7 @@ int cnt = 0; for (size_t xc = 0; xc < sizeof(test); xc++) { - if (cnt == 0) printf("%04x | ", xc); + if (cnt == 0) printf("%04" DM_PRIx_SIZE_T " | ", xc); printf("%02x ", *(test + xc)); if (cnt++ >= 15) { printf("\n"); cnt = 0; } }