[gimp] app: silence gcc warning
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: silence gcc warning
- Date: Sat, 7 Apr 2018 12:46:22 +0000 (UTC)
commit 81e1e3967d0395c2f10ffc312c8409327041cf0c
Author: Massimo Valentini <mvalentini src gnome org>
Date: Sat Apr 7 14:30:30 2018 +0200
app: silence gcc warning
gimp-templates.c:143:15: warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from
a string of the same length [-Wstringop-truncation]
strncpy (dpi, "ppi", 3);
^~~~~~~~~~~~~~~~~~~~~~~
app/core/gimp-templates.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimp-templates.c b/app/core/gimp-templates.c
index a3c9393..f5a3643 100644
--- a/app/core/gimp-templates.c
+++ b/app/core/gimp-templates.c
@@ -140,7 +140,7 @@ gimp_templates_migrate_get_child_by_name (GimpContainer *container,
if (dpi)
{
- strncpy (dpi, "ppi", 3);
+ strncpy (dpi, "ppi", 4);
g_print ("replaced: %s\n", str1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]