Skip to content

Fix compiler warnings

Samuel Gaist requested to merge sgaist/krita:fix_compiler_warnings into master

This merge request fixes all warnings emitted with clang on macOS except the ones related to the deprecation in KoDocumentResourceManager.

Most of these cleanups are coming from missing override keywords, initialization ordering or unused variables.

They have been grouped together except when:

  • Fixing the warning triggered a chain of other action like bigger code removal
  • Fixing a warning showed that the code was maybe not implemented as expected
  • There was refactoring that shall maybe handled separately

In order to ensure the build was done without any warning, -Werror was added to the compile options

Test Plan

Use Krita as usual checking for the parts related to the last three commits. KisLiquifyTransformWorker::approxChangeRect might provide a different result since know it uses the step calculated. The last two commits shall yield the same result as before.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports