Skip to content

Commit 1de5447

Browse files
committed
fix 2 Win warnings (Delta + cf/noise)
1 parent 76429bd commit 1de5447

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/capture_filter/noise.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ parse_fmt(struct state_noise *s, char *ccfg)
9494
ccfg = nullptr;
9595
if (IS_KEY_PREFIX(item, "magnitude")) {
9696
char *endptr = nullptr;
97-
const long val =
98-
strtol(strchr(item, '=') + 1, &endptr, 0);
99-
if (val <= 0 || val > UINT_MAX || *endptr != '\0') {
100-
MSG(ERROR, "Wrong value given: %ld!\n", val);
97+
item = strchr(item, '=') + 1;
98+
const unsigned long val = strtoul(item, &endptr, 0);
99+
if (val > UINT_MAX || *endptr != '\0') {
100+
MSG(ERROR, "Wrong value given: %lu (%s)!\n",
101+
val, item);
101102
return -1;
102103
}
103104
s->magnitude = val;

src/deltacast_common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ delta_set_nb_channels(ULONG BrdId, HANDLE BoardHandle, ULONG RequestedRx,
414414
Result = VHD_SetBiDirCfg(BrdId, it->second);
415415
if (Result == VHDERR_NOERROR) {
416416
MSG(INFO,
417-
"Set bidirectional channel configuration %" PRIu32
418-
" In / %" PRIu32 " Out\n",
417+
"Set bidirectional channel configuration %" PRIu_ULONG
418+
" In / %" PRIu_ULONG " Out\n",
419419
RequestedRx, NbChanOnBoard - RequestedRx);
420420
return true;
421421
}

0 commit comments

Comments
 (0)