libyal / libpff

Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format
GNU Lesser General Public License v3.0
289 stars 74 forks source link

stand-alone usage of libfdata raises implicit declaration warnings #45

Closed blshkv closed 6 years ago

blshkv commented 7 years ago

GCC (gcc-5.4.0) with -Wall should give the same results:

 * Messages for package app-forensics/libpff-20161119:

 *            may exhibit random runtime failures.
 * libpff_data_array.c:924:6: warning: implicit declaration of function ‘libfdata_list_element_get_element_index’ [-Wimplicit-function-declaration]
 * libpff_descriptors_index.c:148:8: warning: implicit declaration of function ‘libfdata_tree_free’ [-Wimplicit-function-declaration]
 * libpff_descriptors_index.c:257:7: warning: implicit declaration of function ‘libfdata_tree_initialize’ [-Wimplicit-function-declaration]
 * libpff_descriptors_index.c:283:7: warning: implicit declaration of function ‘libfdata_tree_set_root_node’ [-Wimplicit-function-declaration]
 * libpff_index.c:347:7: warning: implicit declaration of function ‘libfdata_tree_node_resize_sub_nodes’ [-Wimplicit-function-declaration]
 * libpff_index.c:367:8: warning: implicit declaration of function ‘libfdata_tree_node_set_sub_node_by_index’ [-Wimplicit-function-declaration]
 * libpff_index.c:507:9: warning: implicit declaration of function ‘libfdata_tree_node_append_sub_node’ [-Wimplicit-function-declaration]
 * libpff_index.c:526:9: warning: implicit declaration of function ‘libfdata_tree_node_set_deleted_sub_node’ [-Wimplicit-function-declaration]
 * libpff_index.c:763:7: warning: implicit declaration of function ‘libfdata_tree_node_set_leaf’ [-Wimplicit-function-declaration]
 * libpff_index.c:798:12: warning: implicit declaration of function ‘libfdata_tree_node_sub_nodes_data_range_is_set’ [-Wimplicit-function-declaration]
 * libpff_index.c:815:8: warning: implicit declaration of function ‘libfdata_tree_node_set_sub_nodes_data_range’ [-Wimplicit-function-declaration]
 * libpff_index.c:906:11: warning: implicit declaration of function ‘libfdata_tree_node_is_root’ [-Wimplicit-function-declaration]
 * libpff_index.c:989:6: warning: implicit declaration of function ‘libfdata_tree_node_set_node_value’ [-Wimplicit-function-declaration]
 * libpff_index.c:1063:6: warning: implicit declaration of function ‘libfdata_tree_node_get_node_value’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:80:6: warning: implicit declaration of function ‘libfdata_tree_get_root_node’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:146:6: warning: implicit declaration of function ‘libfdata_tree_node_get_number_of_sub_nodes’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:167:7: warning: implicit declaration of function ‘libfdata_tree_node_get_sub_node_by_index’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:186:7: warning: implicit declaration of function ‘libfdata_tree_node_get_node_value’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:239:12: warning: implicit declaration of function ‘libfdata_tree_node_is_leaf’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:260:13: warning: implicit declaration of function ‘libfdata_tree_node_is_deleted’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:1305:7: warning: implicit declaration of function ‘libfdata_tree_node_split_sub_nodes’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:1341:6: warning: implicit declaration of function ‘libfdata_tree_node_insert_sub_node’ [-Wimplicit-function-declaration]
 * libpff_index_tree.c:1365:6: warning: implicit declaration of function ‘libfdata_tree_node_set_leaf_sub_node’ [-Wimplicit-function-decla * libpff_offsets_index.c:148:8: warning: implicit declaration of function ‘libfdata_tree_free’ [-Wimplicit-function-declaration]
 * libpff_offsets_index.c:257:7: warning: implicit declaration of function ‘libfdata_tree_initialize’ [-Wimplicit-function-declaration]
 * libpff_offsets_index.c:283:7: warning: implicit declaration of function ‘libfdata_tree_set_root_node’ [-Wimplicit-function-declaration]
 * libpff_recover.c:201:6: warning: implicit declaration of function ‘libfdata_tree_get_number_of_leaf_nodes’ [-Wimplicit-function-declaration]
 * libpff_recover.c:226:7: warning: implicit declaration of function ‘libfdata_tree_get_leaf_node_by_index’ [-Wimplicit-function-declaration]
 * libpff_recover.c:245:7: warning: implicit declaration of function ‘libfdata_tree_node_get_node_value’ [-Wimplicit-function-declaration]
 * libpff_recover.c:555:8: warning: implicit declaration of function ‘libfdata_tree_node_set_deleted’ [-Wimplicit-function-declaration]
 * libpff_recover.c:796:6: warning: implicit declaration of function ‘libfdata_tree_get_number_of_deleted_leaf_nodes’ [-Wimplicit-function-declaration]
 * libpff_recover.c:821:7: warning: implicit declaration of function ‘libfdata_tree_get_deleted_leaf_node_by_index’ [-Wimplicit-function-declaration]
 * libpff_recover.c:1006:7: warning: implicit declaration of function ‘libfdata_tree_node_get_data_range’ [-Wimplicit-function-declaration]
 * libpff_table.c:227:8: warning: implicit declaration of function ‘libfdata_tree_free’ [-Wimplicit-function-declaration]
 * libpff_table.c:421:7: warning: implicit declaration of function ‘libfdata_tree_clone’ [-Wimplicit-function-declaration]
 * export_handle.c:7527:13: warning: implicit declaration of function ‘libcpath_path_sanitize_filename’ [-Wimplicit-function-declaration]
 * Please do not file a Gentoo bug and instead report the above QA
 * issues directly to the upstream developers of this software.
 * Homepage: https://github.com/libyal/libpff
>>> Auto-cleaning packages...
joachimmetz commented 7 years ago

This is because you are building it with a stand-alone version of libfdata that does not export these functions.

As indicated before this is not the recommended approach

blshkv commented 7 years ago

I have a strong opinion that this approach is the way to go. There are multiple packages which re-using the same libraries (cerror and bunch of others) and it totally make sense to compile them as shared libraries.

Back to the topic, you might not see warnings but the code could be not as good as other libraries. At least, I don't see such warnings with other 20 libc* libraries from your tree.

joachimmetz commented 7 years ago

This is because this is WIP as you can see in https://github.com/libyal/libfdata/blob/master/include/libfdata.h.in#L1084 there are no libfdata_tree functions in the public api yet.

joachimmetz commented 7 years ago

I have a strong opinion that this approach is the way to go. There are multiple packages which re-using the same libraries (cerror and bunch of others) and it totally make sense to compile them as shared libraries.

Again, at this point in time this is not recommended

blshkv commented 7 years ago

ok, noted. I look forward for better times. Hopefully, you will improve it soon. It's just easier to support it this way. IMHO of cause.

joachimmetz commented 7 years ago

Hopefully, you will improve it soon.

When time permits.

It's just easier to support it this way.

No its not, the approach you so strongly prefer, can lead to subtle hard to debug issues

joachimmetz commented 6 years ago

No updates in a while closing issue seeing this is WIP