[gnome-software/wip/wformat-warnings] misc: Correct -Wformat compiler warnings on 32bit architectures
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/wformat-warnings] misc: Correct -Wformat compiler warnings on 32bit architectures
- Date: Fri, 1 Jul 2022 11:01:56 +0000 (UTC)
commit 54dae15870591b56ccb582e09210f61c16e2f56f
Author: Milan Crha <mcrha redhat com>
Date: Fri Jul 1 12:59:58 2022 +0200
misc: Correct -Wformat compiler warnings on 32bit architectures
This addresses these warning from 32bit architectures:
../src/gs-css.c:169:28: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument
4 has type ‘gsize’ {aka ‘unsigned int’} [-Wformat=]
169 | g_warning ("ignoring parse error %lu:%lu: %s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170 | start_location->lines + 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| gsize {aka unsigned int}
../src/gs-common.c: In function ‘gs_utils_widget_css_parsing_error_cb’:
../src/gs-common.c:336:20: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but
argument 4 has type ‘gsize’ {aka ‘unsigned int’} [-Wformat=]
336 | g_warning ("CSS parse error %lu:%lu: %s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
337 | start_location->lines + 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| gsize {aka unsigned int}
src/gs-common.c | 2 +-
src/gs-css.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-common.c b/src/gs-common.c
index 948fdadbf..7675dd205 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -333,7 +333,7 @@ gs_utils_widget_css_parsing_error_cb (GtkCssProvider *provider,
const GtkCssLocation *start_location;
start_location = gtk_css_section_get_start_location (section);
- g_warning ("CSS parse error %lu:%lu: %s",
+ g_warning ("CSS parse error %" G_GSIZE_FORMAT ":%" G_GSIZE_FORMAT ": %s",
start_location->lines + 1,
start_location->line_chars,
error->message);
diff --git a/src/gs-css.c b/src/gs-css.c
index 73b546caf..ff818553a 100644
--- a/src/gs-css.c
+++ b/src/gs-css.c
@@ -166,7 +166,7 @@ _css_parsing_error_cb (GtkCssProvider *provider,
const GtkCssLocation *start_location;
start_location = gtk_css_section_get_start_location (section);
- g_warning ("ignoring parse error %lu:%lu: %s",
+ g_warning ("ignoring parse error %" G_GSIZE_FORMAT ":%" G_GSIZE_FORMAT ": %s",
start_location->lines + 1,
start_location->line_chars,
error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]