GNOME Bugzilla – Bug 769526
Code cleanups and warning fixes
Last modified: 2016-08-05 10:02:14 UTC
Attaching patches to clean up code and eliminate a couple of warnings.
Created attachment 332743 [details] [review] Clean up dead assigments A static analyzer revealed a number of dead assignments, which have a negative effect on readability. This commit removes them.
Created attachment 332744 [details] [review] file-undo-operations: use labs() instead of abs() trash_retrieve_files_to_restore_thread() calls abs() with an argument of type long, where as abs() accepts ints. This commit fixes that by replacing the call with one to labs().
Created attachment 332745 [details] [review] shell-search-provider: fix incompatible pointer assignment In execute_search(), there is a pointer assignment of incompatible type. This commit fixes that by adjusting the variable type.
Created attachment 332746 [details] [review] file-undo-operations: use ABS macro instead of abs() trash_retrieve_files_to_restore_thread() calls abs() with an argument of type long, whereas abs() accepts ints. This commit fixes that by replacing the call with the ABS macro, which is type-agnostic.
Review of attachment 332746 [details] [review]: LGTM! I think I might've been the one who wrote abs instead of ABS, woops.
Review of attachment 332745 [details] [review]: LGTM, thanks!
Review of attachment 332743 [details] [review]: LGTM, thanks!
Everything fine, thanks!
Attachment 332743 [details] pushed as 2c7620a - Clean up dead assigments Attachment 332745 [details] pushed as d2bf6f7 - shell-search-provider: fix incompatible pointer assignment Attachment 332746 [details] pushed as e3025d4 - file-undo-operations: use ABS macro instead of abs()