X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fprogress.c;h=2f1c22259dd1800579a5e94edb704436ac570a6f;hp=de108e76be44bb72e29bcdeef9a2a8e800472f54;hb=48b53471e89938fde4588bea068578ab2ae7864f;hpb=695e40eb87d85429b22265a35bd842462b376a90 diff --git a/src/progress.c b/src/progress.c index de108e76..2f1c2225 100644 --- a/src/progress.c +++ b/src/progress.c @@ -93,10 +93,10 @@ static int current_impl_locked; bool valid_progress_implementation_p (const char *name) { - int i; + size_t i; struct progress_implementation *pi = implementations; char *colon = strchr (name, ':'); - int namelen = colon ? colon - name : strlen (name); + size_t namelen = colon ? (size_t) (colon - name) : strlen (name); for (i = 0; i < countof (implementations); i++, pi++) if (!strncmp (pi->name, name, namelen)) @@ -109,7 +109,7 @@ valid_progress_implementation_p (const char *name) void set_progress_implementation (const char *name) { - int i, namelen; + size_t i, namelen; struct progress_implementation *pi = implementations; const char *colon; @@ -117,7 +117,7 @@ set_progress_implementation (const char *name) name = DEFAULT_PROGRESS_IMPLEMENTATION; colon = strchr (name, ':'); - namelen = colon ? colon - name : strlen (name); + namelen = colon ? (size_t) (colon - name) : strlen (name); for (i = 0; i < countof (implementations); i++, pi++) if (!strncmp (pi->name, name, namelen))