warning C4003: not enough arguments for function-like macro invocation 'warning'
G_STMT_END macro is extended to the below form with MSVC
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
while(0) \
__pragma(warning(pop))
So MSVC preprocessor will extend it further to
__pragma(VBI_CAT_LEVEL_LOG(push)) ...
Should rename warning() debug macro function therefore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1018>
/* n_points = n_points; */
/* raw = raw; */
- warning (&bs->log, "vbi3_bit_slicer_set_params() not called.");
+ warn (&bs->log, "vbi3_bit_slicer_set_params() not called.");
return FALSE;
}
*n_points = 0;
if (bs->payload > buffer_size * 8) {
- warning (&bs->log,
+ warn (&bs->log,
"buffer_size %u < %u bits of payload.", buffer_size * 8, bs->payload);
return FALSE;
}
if (bs->total_bits > max_points) {
- warning (&bs->log,
+ warn (&bs->log,
"max_points %u < %u CRI, FRC and payload bits.",
max_points, bs->total_bits);
return FALSE;
if (low_pass_bit_slicer_Y8 == bs->func) {
return bs->func (bs, buffer, points, n_points, raw);
} else if (bit_slicer_Y8 != bs->func) {
- warning (&bs->log,
+ warn (&bs->log,
"Function not implemented for pixfmt %u.", bs->sample_format);
return bs->func (bs, buffer,
/* points */ NULL,
assert (NULL != raw);
if (bs->payload > buffer_size * 8) {
- warning (&bs->log,
+ warn (&bs->log,
"buffer_size %u < %u bits of payload.", buffer_size * 8, bs->payload);
return FALSE;
}
assert (samples_per_line <= 32767);
if (cri_rate > sampling_rate) {
- warning (&bs->log,
- "cri_rate %u > sampling_rate %u.", cri_rate, sampling_rate);
+ warn (&bs->log, "cri_rate %u > sampling_rate %u.", cri_rate, sampling_rate);
goto failure;
}
if (payload_rate > sampling_rate) {
- warning (&bs->log,
+ warn (&bs->log,
"payload_rate %u > sampling_rate %u.", payload_rate, sampling_rate);
goto failure;
}
default:
- warning (&bs->log,
+ warn (&bs->log,
"Unknown sample_format 0x%x.", (unsigned int) sample_format);
return FALSE;
}
if ((sample_offset > samples_per_line)
|| ((cri_samples + data_samples)
> (samples_per_line - sample_offset))) {
- warning (&bs->log,
+ warn (&bs->log,
"%u samples_per_line too small for "
"sample_offset %u + %u cri_bits (%u samples) "
"+ %u frc_bits and %u payload_bits "
}
} else {
bounds:
- warning (caller, "Sliced line %u out of bounds.", sliced->line);
+ warn (caller, "Sliced line %u out of bounds.", sliced->line);
return FALSE;
}
break;
default:
- warning (caller,
+ warn (caller,
"Service 0x%08x (%s) not supported.",
sliced->id, vbi_sliced_name (sliced->id));
return FALSE;
n_scan_lines = sp->count[0] + sp->count[1];
if (unlikely (n_scan_lines * sp->bytes_per_line > raw_size)) {
- warning (__FUNCTION__,
+ warn (__FUNCTION__,
"(%u + %u lines) * %lu bytes_per_line "
"> %lu raw_size.",
sp->count[0], sp->count[1],
}
if (unlikely (0 != white_level && blank_level > white_level)) {
- warning (__FUNCTION__,
+ warn (__FUNCTION__,
"Invalid blanking %d or peak white level %d.",
blank_level, white_level);
}
n_scan_lines = sp->count[0] + sp->count[1];
if (unlikely (n_scan_lines * sp->bytes_per_line > raw_size)) {
- warning (__FUNCTION__,
+ warn (__FUNCTION__,
"%u + %u lines * %lu bytes_per_line > %lu raw_size.",
sp->count[0], sp->count[1],
(unsigned long) sp->bytes_per_line, raw_size);
if (unlikely (0 != white_level
&& (blank_level > black_level || black_level > white_level))) {
- warning (__FUNCTION__,
+ warn (__FUNCTION__,
"Invalid blanking %d, black %d or peak "
"white level %d.", blank_level, black_level, white_level);
}
#ifdef G_HAVE_GNUC_VARARGS
#define error(hook, templ, args...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_ERROR, NULL, templ , ##args)
-#define warning(hook, templ, args...) \
+#define warn(hook, templ, args...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_WARNING, NULL, templ , ##args)
#define notice(hook, templ, args...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, templ , ##args)
#elif defined(G_HAVE_ISO_VARARGS)
#define error(hook, templ, ...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_ERROR, NULL, templ, __VA_ARGS__)
-#define warning(hook, templ, ...) \
+#define warn(hook, templ, ...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_WARNING, NULL, templ, __VA_ARGS__)
#define notice(hook, templ, ...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, templ, __VA_ARGS__)
if (0 == (VBI_VIDEOSTD_SET_ALL & videostd_set_req)
|| ((VBI_VIDEOSTD_SET_525_60 & videostd_set_req)
&& (VBI_VIDEOSTD_SET_625_50 & videostd_set_req))) {
- warning (log,
+ warn (log,
"Ambiguous videostd_set 0x%lx.", (unsigned long) videostd_set_req);
CLEAR (*sp);
return 0;