# HG changeset patch # User Paul Boddie # Date 1623797549 -7200 # Node ID 85cb541354aa45f0af415a3cf7d5c75d9ad3a0b2 # Parent a5450be2b2f2d1844854e5f6ad82696dcf8af571 Silence warnings about incomplete string copying despite zero-initialised memory being used. diff -r a5450be2b2f2 -r 85cb541354aa templates/native/locale.c --- a/templates/native/locale.c Thu Jul 16 16:56:24 2020 +0200 +++ b/templates/native/locale.c Wed Jun 16 00:52:29 2021 +0200 @@ -1,6 +1,6 @@ /* Native functions for locale handling. -Copyright (C) 2016, 2017 Paul Boddie +Copyright (C) 2016, 2017, 2021 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -43,7 +43,7 @@ length = strlen(result); out = __ALLOCATE(length + 1, sizeof(char)); - strncpy(out, result, length); + strcpy(out, result); return __new_str(result, length); } @@ -64,7 +64,7 @@ length = strlen(result); out = __ALLOCATE(length + 1, sizeof(char)); - strncpy(out, result, length); + strcpy(out, result); return __new_str(result, length); }