mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-12-02 21:24:07 +00:00
Resolve warnings about assignments within conditions.
- Working towards issue #11.
This commit is contained in:
parent
d44d1837bb
commit
61ae195af7
|
@ -157,7 +157,6 @@ static int config_parse(config *cfg, const char *name, const char *value)
|
||||||
static const char * const colormatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m",
|
static const char * const colormatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m",
|
||||||
"smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL };
|
"smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL };
|
||||||
|
|
||||||
int i;
|
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
|
@ -165,8 +164,9 @@ static int config_parse(config *cfg, const char *name, const char *value)
|
||||||
if (!value)
|
if (!value)
|
||||||
value = "true";
|
value = "true";
|
||||||
|
|
||||||
if ((!strncmp(name, "no-", 3) && (i = 3))) {
|
// Treat "--no-param" as --param 0
|
||||||
name += i;
|
if ((!strncmp(name, "no-", 3))) {
|
||||||
|
name += 3;
|
||||||
value = atobool(value) ? "false" : "true";
|
value = atobool(value) ? "false" : "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,8 @@ int main(int argc, char *argv[])
|
||||||
sprintf(dim_str, "_%dx%d.yuv", cfg->width, cfg->height);
|
sprintf(dim_str, "_%dx%d.yuv", cfg->width, cfg->height);
|
||||||
left_len = strlen(cfg->debug);
|
left_len = strlen(cfg->debug);
|
||||||
right_len = strlen(dim_str);
|
right_len = strlen(dim_str);
|
||||||
if (!(cfg->debug = realloc(cfg->debug, left_len + right_len + 1))) {
|
cfg->debug = realloc(cfg->debug, left_len + right_len + 1);
|
||||||
|
if (!cfg->debug) {
|
||||||
fprintf(stderr, "realloc failed!\n");
|
fprintf(stderr, "realloc failed!\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue