Skip to content

Instantly share code, notes, and snippets.

@fengb
Created August 15, 2019 22:28
Show Gist options
  • Save fengb/217f5e13b321fe8262575edd518762de to your computer and use it in GitHub Desktop.
Save fengb/217f5e13b321fe8262575edd518762de to your computer and use it in GitHub Desktop.
[ 90%] Building CXX object CMakeFiles/compiler.dir/src/codegen.cpp.o
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3824:24: error: variable 'frame_result_loc' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
} else if (cc == CallingConventionAsync) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3884:16: note: uninitialized use occurs here
assert(frame_result_loc != nullptr);
^~~~~~~~~~~~~~~~
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3824:20: note: remove the 'if' if its condition is always true
} else if (cc == CallingConventionAsync) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3811:34: note: initialize the variable 'frame_result_loc' to silence this warning
LLVMValueRef frame_result_loc;
^
= nullptr
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3824:24: error: variable 'awaiter_init_val' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
} else if (cc == CallingConventionAsync) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3895:36: note: uninitialized use occurs here
LLVMBuildStore(g->builder, awaiter_init_val, awaiter_ptr);
^~~~~~~~~~~~~~~~
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3824:20: note: remove the 'if' if its condition is always true
} else if (cc == CallingConventionAsync) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/benjamin.feng/projects/zig/src/codegen.cpp:3812:34: note: initialize the variable 'awaiter_init_val' to silence this warning
LLVMValueRef awaiter_init_val;
^
= nullptr
2 errors generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment