lib/fetch/http.c: remove unused variable

thanks clang!

fetch/http.c:605:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
        int t, r;
               ^
This commit is contained in:
classabbyamp 2023-04-12 12:27:16 -04:00 committed by Duncan Overbruck
parent 79f29ed53e
commit b5b26630e9

View File

@ -602,13 +602,12 @@ http_base64(const char *src)
"0123456789+/";
char *str, *dst;
size_t l;
int t, r;
int t;
l = strlen(src);
if ((str = malloc(((l + 2) / 3) * 4 + 1)) == NULL)
return (NULL);
dst = str;
r = 0;
while (l >= 3) {
t = (src[0] << 16) | (src[1] << 8) | src[2];
@ -617,7 +616,7 @@ http_base64(const char *src)
dst[2] = base64[(t >> 6) & 0x3f];
dst[3] = base64[(t >> 0) & 0x3f];
src += 3; l -= 3;
dst += 4; r += 4;
dst += 4;
}
switch (l) {
@ -628,7 +627,6 @@ http_base64(const char *src)
dst[2] = base64[(t >> 6) & 0x3f];
dst[3] = '=';
dst += 4;
r += 4;
break;
case 1:
t = src[0] << 16;
@ -636,7 +634,6 @@ http_base64(const char *src)
dst[1] = base64[(t >> 12) & 0x3f];
dst[2] = dst[3] = '=';
dst += 4;
r += 4;
break;
case 0:
break;