Void-Safe Library Results: Difference between revisions
Jump to navigation
Jump to search
More found bugs |
|||
| Line 5: | Line 5: | ||
<e> | <e> | ||
insert_item (an_item: WEL_TREE_VIEW_INSERT_STRUCT) | |||
-- Insert `an_item' in the tree. | |||
require | |||
exists: exists | |||
an_item_not_void: an_item /= Void | |||
an_item_exists: an_item.exists | |||
local | |||
l_user_item: WEL_TREE_VIEW_ITEM | |||
do | |||
last_item := {WEL_API}.send_message_result (item, Tvm_insertitem, | |||
to_wparam (0), an_item.item) | |||
an_item.tree_view_item.set_h_item (last_item) | |||
an_item.'user_tree_view_item.set_h_item (last_item)' | |||
ensure | |||
new_count: count = old count + 1 | |||
end | |||
</e> | |||
* Call on Void target found in <e>{WEL_MSGBOXPARAMS}.make_by_id</e>, the code protected against `a_window' being Void but then in the final call still used `a_window' instead of the computed `handle': | |||
<e> | |||
if a_window /= Void then | |||
handle := a_window.item | |||
else | |||
handle := default_pointer | |||
end | |||
structure_make | |||
cwel_msgboxparams_set (item, 'a_window.item', a_main_arguments.resource_instance.item, | |||
a_wel_string1.item, | |||
a_wel_string2.item, a_style, cwin_make_int_resource (an_id), | |||
cwin_make_lang_id (a_language, a_sublanguage)) | |||
</e> | </e> | ||
Revision as of 18:25, 22 January 2009
List of bugs found by compiling our library in void-safe mode.
WEL
- Call on Void target found in
{WEL_TREE_VIEW}.insert_itembecause there is no guarantee that `user_tree_view_item' will be attached in `an_item':
insert_item (an_item: WEL_TREE_VIEW_INSERT_STRUCT) -- Insert `an_item' in the tree. require exists: exists an_item_not_void: an_item /= Void an_item_exists: an_item.exists local l_user_item: WEL_TREE_VIEW_ITEM do last_item := {WEL_API}.send_message_result (item, Tvm_insertitem, to_wparam (0), an_item.item) an_item.tree_view_item.set_h_item (last_item) an_item.'user_tree_view_item.set_h_item (last_item)' ensure new_count: count = old count + 1 end
- Call on Void target found in
{WEL_MSGBOXPARAMS}.make_by_id, the code protected against `a_window' being Void but then in the final call still used `a_window' instead of the computed `handle':
if a_window /= Void then handle := a_window.item else handle := default_pointer end structure_make cwel_msgboxparams_set (item, 'a_window.item', a_main_arguments.resource_instance.item, a_wel_string1.item, a_wel_string2.item, a_style, cwin_make_int_resource (an_id), cwin_make_lang_id (a_language, a_sublanguage))