We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ext_string_pkg
Hi guys, once again when I run VUnit test ModelSim/QuestaSim (I'm using both) spit out warnings regarding the ext_string_pkg file. The warnings are:
\vunit\vhdl\data_types\src\api\external_integer_vector_pkg.vhd(40): Function 'read_integer' may complete without a RETURN at line 39.
\vunit\vhdl\data_types\src\api\external_integer_vector_pkg.vhd(46): Function 'get_ptr' may complete without a RETURN at line 45.
The flagged lines of code are:
impure function read_char ( id : integer; i : integer ) return character is begin assert false report "EXTERNAL read_char" severity failure; --! Return statement missing! end; impure function get_ptr ( id : integer ) return extstring_access_t is begin assert false report "EXTERNAL get_string_ptr" severity failure; --! Return statement missing! end;
I think just adding a return statement with a dummy value, would do the trick or converting those to procedure may also do the trick:
impure function read_char ( id : integer; i : integer ) return character is begin assert false report "EXTERNAL read_char" severity failure; return ""; end; impure function get_ptr ( id : integer ) return extstring_access_t is variable dummy_ptr: extstring_access_t; begin assert false report "EXTERNAL get_string_ptr" severity failure; dummy_ptr := new extstring_access_t dummy_ptr.all; -- Don't know if the syntax is correct end;
Or
procedure read_char ( id : integer; i : integer ) is begin assert false report "EXTERNAL read_char" severity failure; end; procedure get_ptr ( id : integer ) is begin assert false report "EXTERNAL get_string_ptr" severity failure; end;
The text was updated successfully, but these errors were encountered:
Added return statements after breaking asserts to avoid compiler warn…
36a3d23
…ings. Fixes #996.
2874025
dbf9b7e
…ings. Fixes VUnit#996.
No branches or pull requests
Hi guys, once again when I run VUnit test ModelSim/QuestaSim (I'm using both) spit out warnings regarding the
ext_string_pkg
file.The warnings are:
\vunit\vhdl\data_types\src\api\external_integer_vector_pkg.vhd(40): Function 'read_integer' may complete without a RETURN at line 39.
\vunit\vhdl\data_types\src\api\external_integer_vector_pkg.vhd(46): Function 'get_ptr' may complete without a RETURN at line 45.
The flagged lines of code are:
I think just adding a return statement with a dummy value, would do the trick or converting those to procedure may also do the trick:
Or
The text was updated successfully, but these errors were encountered: