From d72fd951e172f1ef5dfabaae8c54cd04e9524dfa Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 Nov 2023 08:44:11 -0500 Subject: [PATCH 1/2] Quiet a compiler warning --- gdk/gdkdmabuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/gdkdmabuf.c b/gdk/gdkdmabuf.c index 316d2d69c1..6835caf055 100644 --- a/gdk/gdkdmabuf.c +++ b/gdk/gdkdmabuf.c @@ -710,7 +710,8 @@ gdk_dmabuf_direct_downloader_do_download (const GdkDmabufDownloader *downloader, dmabuf = gdk_dmabuf_texture_get_dmabuf (GDK_DMABUF_TEXTURE (texture)); info = get_drm_format_info (dmabuf->fourcc); - g_return_if_fail (info->download); + + g_return_if_fail (info && info->download); GDK_DISPLAY_DEBUG (gdk_dmabuf_texture_get_display (GDK_DMABUF_TEXTURE (texture)), DMABUF, "Using %s for downloading a dmabuf (format %.4s:%#" G_GINT64_MODIFIER "x)", From d595aff52d35881ff1f5169e104403326674d5d7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 Nov 2023 09:07:38 -0500 Subject: [PATCH 2/2] coding style: Mention the available stack size --- docs/CODING-STYLE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/CODING-STYLE.md b/docs/CODING-STYLE.md index 5deaf9e91b..20648d906b 100644 --- a/docs/CODING-STYLE.md +++ b/docs/CODING-STYLE.md @@ -685,6 +685,8 @@ stack-allocated using `g_newa()` or `g_alloca()`. But limit the amount of stack memory that you consume this way, in particular in recursive functions. +On Windows, the default stack size we have to work with is 1M. + ### Macros Try to avoid private macros unless strictly necessary. Remember to #undef