siglent-sds: Use PRIu64 for uint64_t variables.

This fixes various compiler warnings on some systems.
This commit is contained in:
Uwe Hermann 2018-02-17 16:01:58 +01:00
parent 2dedd64e11
commit 641107aa6c
1 changed files with 8 additions and 8 deletions

View File

@ -592,16 +592,16 @@ static int config_set(uint32_t key, GVariant *data,
devc->timebase = (float) p / q; devc->timebase = (float) p / q;
switch (q) { switch (q) {
case 1: case 1:
cmd = g_strdup_printf("%luS", p); cmd = g_strdup_printf("%" PRIu64 "S", p);
break; break;
case 1000: case 1000:
cmd = g_strdup_printf("%luMS", p); cmd = g_strdup_printf("%" PRIu64 "MS", p);
break; break;
case 1000000: case 1000000:
cmd = g_strdup_printf("%luUS", p); cmd = g_strdup_printf("%" PRIu64 "US", p);
break; break;
case 100000000: case 100000000:
cmd = g_strdup_printf("%luNS", p); cmd = g_strdup_printf("%" PRIu64 "NS", p);
break; break;
} }
sr_dbg("Setting device timebase: TDIV %s.", cmd); sr_dbg("Setting device timebase: TDIV %s.", cmd);
@ -658,13 +658,13 @@ static int config_set(uint32_t key, GVariant *data,
cmd = ""; cmd = "";
switch (q) { switch (q) {
case 1: case 1:
cmd = g_strdup_printf("%luV", p); cmd = g_strdup_printf("%" PRIu64 "V", p);
break; break;
case 1000: case 1000:
cmd = g_strdup_printf("%luMV", p); cmd = g_strdup_printf("%" PRIu64 "MV", p);
break; break;
case 100000: case 100000:
cmd = g_strdup_printf("%luUV", p); cmd = g_strdup_printf("%" PRIu64 "UV", p);
break; break;
} }
return siglent_sds_config_set(sdi, "C%d:VDIV %s", i + 1, cmd); return siglent_sds_config_set(sdi, "C%d:VDIV %s", i + 1, cmd);
@ -712,7 +712,7 @@ static int config_set(uint32_t key, GVariant *data,
return ret; return ret;
} }
} }
sr_err("Invalid probe factor: %"PRIu64".", p); sr_err("Invalid probe factor: %" PRIu64 ".", p);
return SR_ERR_ARG; return SR_ERR_ARG;
} }
} }