Skip to content

Conversation

mikhainin
Copy link
Contributor

Even though, we initialise "space_string" with NULL, we goto schema_space_value_free() before this statement.

Even though, we initialise "space_string" with NULL,
we goto schema_space_value_free() before this statement.
@mikhainin
Copy link
Contributor Author

mikhainin commented Aug 3, 2023

The problem was found by Polaris. A similar thing may be reported by Clang:

~/tmp/hello via C v14.0.3-clang viav3.25.2 on ☁️    🕙 46mscat hello.c
void foo(int x) {
    (void)x;
}

void bar(void) {
    goto aaaa;
    int x = 10;
aaaa:
    foo(x);
}

~/tmp/hello via C v14.0.3-clang viav3.25.2 on ☁️    🕙 43mscc -Wall -Wextra -pedantic-errors -c hello.c
hello.c:10:2: error: no newline at end of file [-Werror,-Wnewline-eof]
}
 ^
hello.c:9:6: warning: variable 'x' is uninitialized when used here [-Wuninitialized]
        foo(x);
            ^
hello.c:7:2: note: variable 'x' is declared here
        int x = 10;
        ^
1 warning and 1 error generated.

~/tmp/hello via C v14.0.3-clang viav3.25.2 on ☁️    🕙 43ms

Copy link
Contributor

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks valid. Thank you!

@Totktonada Totktonada merged commit edf8502 into tarantool:master Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants