From bb31baecb37d6023842c80720f61d16ccbc158fa Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Thu, 1 Sep 2016 18:41:48 +0200 Subject: [PATCH] Resolve four warnings in grammar.y Setting the proper type for `len` resolved them. --- lib/cgraph/grammar.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cgraph/grammar.y b/lib/cgraph/grammar.y index 2f3f807bb..6d83a9f91 100644 --- a/lib/cgraph/grammar.y +++ b/lib/cgraph/grammar.y @@ -452,7 +452,7 @@ concat (char* s1, char* s2) char* s; char buf[BUFSIZ]; char* sym; - int len = strlen(s1) + strlen(s2) + 1; + size_t len = strlen(s1) + strlen(s2) + 1; if (len <= BUFSIZ) sym = buf; else sym = (char*)malloc(len); @@ -473,7 +473,7 @@ concatPort (char* s1, char* s2) char* s; char buf[BUFSIZ]; char* sym; - int len = strlen(s1) + strlen(s2) + 2; /* one more for ':' */ + size_t len = strlen(s1) + strlen(s2) + 2; /* one more for ':' */ if (len <= BUFSIZ) sym = buf; else sym = (char*)malloc(len); -- 2.40.0