pidgin/pidgin

Fix incompatible type conversion errors
release-2.x.y
3 months ago, Elliott Sales de Andrade
488055ab5531
Fix incompatible type conversion errors

- A recent libxml2 changed its handler function to take a `const` pointer. It's
safe for us to have it, and them not, but the opposite way causes an implicit
cast warning.
- In relatively new GLib (many years now), `g_object_ref` casts its output to
match its input. This means we should not be casting to `G_OBJECT`, as that
is not the type it expects, and would translate to the output being `GObject`
instead of the original type.

This fixes the build in Fedora 40, which changes several incompatible pointer
conversion warnings into errors.

This patch is partially from the Fedora maintainer @yarda, with some corrections by me (to the `g_object_ref` portions.)

Testing Done:
Compiled in a Rawhide environment with this patch applied.

Bugs closed: PIDGIN-17850

Reviewed at https://reviews.imfreedom.org/r/2944/
environment:
- DOCS_BUILD_IMAGE=docker.io/pidgin/2.x.y-builders:debian-bookworm-amd64
tasks:
clean:
type: convey/clean
files:
- pidgin2-docs
- pidgin2-docs.zip
docs-build:
type: docker/run
image: ${DOCS_BUILD_IMAGE}
workdir: ${CONVEY_WORKSPACE}
script:
- set -ex
- ./autogen.sh --disable-gevolution
- make -s -j$(nproc) docs
- cd doc
- mv html pidgin2
- zip -9r pidgin2-docs.zip pidgin2
docs-clean:
type: convey/clean
files:
- pidgin2-docs
- pidgin2-docs.zip
docs-export:
type: docker/export
files:
- doc/pidgin2-docs.zip:pidgin2-docs.zip
import:
type: docker/import
files: .:.
plans:
clean:
stages:
- tasks: [clean]
docs:
stages:
- tasks: [docs-clean, import, docs-build, docs-export]