Apply fix for static analysis (scan-build) detection of a potential security issue (not checking the return value from setuid).

Fixes #11549
Fix static analysis detected error regarding dead assignment

In v4lchannel.cpp, the int field is assigned a value, and
never used before a later assignment.  Move the declaration
and assignment to the code fragment where it is used (as
with some other existing variables).  This resolves the
static analysis detected error.

Fixes #11551