Remove -Wno-ignored-qualifiers and fix caused warnings