Fix warnings/errors in ceph API tests that are present in FSCrypt.cc
src/client/FSCrypt.cc:90:6: error: variable 'olen' set but not used [-Werror,-Wunused-but-set-variable]
90 | int olen = 0;
| ^
src/client/FSCrypt.cc:91:6: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
91 | int line = 0;
| ^
src/client/FSCrypt.cc:945:2: error: is this the way to do it? [-Werror,-W#warnings]
945 | #warning is this the way to do it?
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
static int b64_encode(char *dst, char * const dst_end, const char *src, const char *end)
{
+
char *orig_dst = dst;
- int olen = 0;
- int line = 0;
#define SET_DST(c) do { \
int __ret = set_str_val(&dst, dst_end, c); \
} else {
SET_DST(encode_bits(((a & 3) << 4)));
}
- olen += 4;
- line += 4;
}
*dst = '\0';
return (dst - orig_dst);
has_hole = true;
break;
}
-#warning is this the way to do it?
+
uint64_t needed_pos = (pos > off ? pos : off);
void *data_pos = bl->c_str() + needed_pos - start_block_off;
if (!has_hole && *(uint64_t *)data_pos == 0) {