Fix warnings in core and common