From 28e928f36b8df61e918a147dafd20ba7244abb9e Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 12 Feb 2018 19:45:31 +0100 Subject: [PATCH] TT#32917 Fix format truncation warning The variable is a uint8_t and it can hold up to 255 values, so we need possibly up to 3 digits plus the ending NUL. Warned-by: gcc-7 Change-Id: I1b0ae3ad141c048ae924b421d2266a8e37a669c5 --- medmysql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/medmysql.c b/medmysql.c index ebaa341..6882e59 100644 --- a/medmysql.c +++ b/medmysql.c @@ -681,8 +681,8 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, uint64_t count, struct medmysql_b return -1; cdr_entry_t *e = &(entries[i]); - char str_source_clir[2] = ""; - char str_split[2] = ""; + char str_source_clir[4] = ""; + char str_split[4] = ""; char str_init_time[32] = ""; char str_start_time[32] = ""; char str_duration[32] = "";