[PATCH 2/2] tests: new test cases for ioctl_v4l2

Dmitry V. Levin ldv at altlinux.org
Wed Apr 12 02:23:13 UTC 2017


On Mon, Apr 10, 2017 at 01:45:02PM +0300, Edgar Kaziahmedov wrote:
[...]
> +static void
> +_print_ioctl_v4l2(struct v4l2_format *const f,
> +		  const char* request, const unsigned int buf_type,
> +		  const char* buf_type_string)

Identifiers starting with underscore are reserved for the implementation,
please use a different name that begins with a [a-z] symbol.

[...]
> +#if HAVE_DECL_V4L2_BUF_TYPE_SDR_CAPTURE
> +	case V4L2_BUF_TYPE_SDR_CAPTURE: {
> +		printf("ioctl(-1, %s, {type=%s"
> +		       ", fmt.sdr={pixelformat=v4l2_fourcc('\\x%x', '\\x%x',"
> +		       " '\\x%x', '\\x%x'), buffersize=%u}}) = -1 EBADF (%m)\n",
> +		       request,
> +		       buf_type_string,
> +		       cc0(magic), cc1(magic), cc2(magic), cc3(magic),
> +		       f->fmt.sdr.buffersize);
> +		break;
> +#endif
> +	}

This turns into a syntax error when V4L2_BUF_TYPE_SDR_CAPTURE is not defined:

ioctl_v4l2.c:304:1: error: expected identifier or '(' before '}' token


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170412/536de3bb/attachment.bin>


More information about the Strace-devel mailing list