From c8219a2387c4c1d9bcfe5d4222ea20ada83e288a Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Thu, 8 Dec 2011 21:30:29 -0800 Subject: [PATCH] Avoid implicit sign conversion --- flower/getopt-long.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flower/getopt-long.cc b/flower/getopt-long.cc index dbabcbcf08..2ade561cce 100644 --- a/flower/getopt-long.cc +++ b/flower/getopt-long.cc @@ -54,7 +54,7 @@ Getopt_long::parselong () assert (*optnm); char const *endopt = strchr (optnm, '='); - size_t searchlen = (endopt) ? endopt - optnm : strlen (optnm); + size_t searchlen = (endopt) ? (size_t) (endopt - optnm) : strlen (optnm); found_option_ = 0; for (int i = 0; i < table_len_; i++) @@ -314,9 +314,9 @@ Long_option_init::table_string (Long_option_init *l) { string tabstr = ""; - int wid = 0; + size_t wid = 0; for (int i = 0; l[i].shortname_char_ || l[i].longname_str0_; i++) - wid = max (int (wid), int (l[i].str_for_help ().length ())); + wid = max (wid, l[i].str_for_help ().length ()); for (int i = 0; l[i].shortname_char_ || l[i].longname_str0_; i++) { -- 2.39.5