diff options
| author | Paul Eggert | 2026-02-13 17:37:50 -0800 |
|---|---|---|
| committer | Paul Eggert | 2026-02-13 17:44:46 -0800 |
| commit | 5d310e00599c11f1ea3cfef896fb524dbf40d1fe (patch) | |
| tree | 63e305e763fd2155eaaf6673535d55d5c415e30d | |
| parent | e847bcca0cde35e4b15dad70150a943f7d78fdd5 (diff) | |
| download | emacs-5d310e00599c11f1ea3cfef896fb524dbf40d1fe.tar.gz emacs-5d310e00599c11f1ea3cfef896fb524dbf40d1fe.zip | |
Pacify GCC with gdk-pixbuf 2.44
* src/pgtkfns.c (xg_set_icon_from_xpm_data):
* src/xfns.c (xg_set_icon_from_xpm_data):
gdk-pixbuf 2.44 (2025-09) deprecated xg_set_icon_from_xpm_data,
and this breaks --enable-gcc-warnings builds.
For now, pacify GCC by using a pragma.
| -rw-r--r-- | src/pgtkfns.c | 17 | ||||
| -rw-r--r-- | src/xfns.c | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c index c336ce36d58..630175b2283 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c | |||
| @@ -769,8 +769,25 @@ xg_set_icon (struct frame *f, Lisp_Object file) | |||
| 769 | bool | 769 | bool |
| 770 | xg_set_icon_from_xpm_data (struct frame *f, const char **data) | 770 | xg_set_icon_from_xpm_data (struct frame *f, const char **data) |
| 771 | { | 771 | { |
| 772 | /* gdk-pixbuf 2.44 deprecated gdk_pixbuf_new_from_xpm_data. | ||
| 773 | Emacs should convert assets to PNG and use gdk_pixbuf_new_from_stream | ||
| 774 | with a GMemoryInputStream, or transition to PNG via GResource. | ||
| 775 | Pacify GCC for now. */ | ||
| 776 | #if (defined GDK_PIXBUF_VERSION_2_44 \ | ||
| 777 | && GDK_PIXBUF_VERSION_2_44 <= GDK_PIXBUF_VERSION_MIN_REQUIRED \ | ||
| 778 | && GNUC_PREREQ (4, 6, 0)) | ||
| 779 | # pragma GCC diagnostic push | ||
| 780 | # pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
| 781 | #endif | ||
| 782 | |||
| 772 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); | 783 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); |
| 773 | 784 | ||
| 785 | #if (defined GDK_PIXBUF_VERSION_2_44 \ | ||
| 786 | && GDK_PIXBUF_VERSION_2_44 <= GDK_PIXBUF_VERSION_MIN_REQUIRED \ | ||
| 787 | && GNUC_PREREQ (4, 6, 0)) | ||
| 788 | # pragma GCC diagnostic pop | ||
| 789 | #endif | ||
| 790 | |||
| 774 | if (!pixbuf) | 791 | if (!pixbuf) |
| 775 | return false; | 792 | return false; |
| 776 | 793 | ||
diff --git a/src/xfns.c b/src/xfns.c index f960f36e24d..87ce3af30d7 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1146,8 +1146,25 @@ xg_set_icon (struct frame *f, Lisp_Object file) | |||
| 1146 | bool | 1146 | bool |
| 1147 | xg_set_icon_from_xpm_data (struct frame *f, const char **data) | 1147 | xg_set_icon_from_xpm_data (struct frame *f, const char **data) |
| 1148 | { | 1148 | { |
| 1149 | /* gdk-pixbuf 2.44 deprecated gdk_pixbuf_new_from_xpm_data. | ||
| 1150 | Emacs should convert assets to PNG and use gdk_pixbuf_new_from_stream | ||
| 1151 | with a GMemoryInputStream, or transition to PNG via GResource. | ||
| 1152 | Pacify GCC for now. */ | ||
| 1153 | #if (defined GDK_PIXBUF_VERSION_2_44 \ | ||
| 1154 | && GDK_PIXBUF_VERSION_2_44 <= GDK_PIXBUF_VERSION_MIN_REQUIRED \ | ||
| 1155 | && GNUC_PREREQ (4, 6, 0)) | ||
| 1156 | # pragma GCC diagnostic push | ||
| 1157 | # pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
| 1158 | #endif | ||
| 1159 | |||
| 1149 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); | 1160 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); |
| 1150 | 1161 | ||
| 1162 | #if (defined GDK_PIXBUF_VERSION_2_44 \ | ||
| 1163 | && GDK_PIXBUF_VERSION_2_44 <= GDK_PIXBUF_VERSION_MIN_REQUIRED \ | ||
| 1164 | && GNUC_PREREQ (4, 6, 0)) | ||
| 1165 | # pragma GCC diagnostic pop | ||
| 1166 | #endif | ||
| 1167 | |||
| 1151 | if (!pixbuf) | 1168 | if (!pixbuf) |
| 1152 | return false; | 1169 | return false; |
| 1153 | 1170 | ||