In several places, jwe.c stores a (signed int) gnutls returned value into an unsigned size_t. This would cause warning like the following:
jwe.c:1872:53: error: conversion to 'size_t {aka long unsigned int}'
from 'int' may change the sign of the result [-Werror=sign-conversion]
I have reviewed each location, and the gnutls lib returns the size of something, in every case, and never a negative number. This means it's safe to cast these return values to (unsigned). The functions returning int are:
gnutls_cipher_get_iv_size
gnutls_cipher_get_tag_size
gnutls_hmac_get_len
gnutls_cipher_get_block_size
gnutls_hash_get_len
This commit adds a cast of (unsigned) to the return value from these function, which avoids the -Werror=sign-conversion warnings
In several places, jwe.c stores a (signed int) gnutls returned value into an unsigned size_t. This would cause warning like the following:
jwe.c:1872:53: error: conversion to 'size_t {aka long unsigned int}' from 'int' may change the sign of the result [-Werror=sign-conversion]
I have reviewed each location, and the gnutls lib returns the size of something, in every case, and never a negative number. This means it's safe to cast these return values to (unsigned). The functions returning int are:
This commit adds a cast of (unsigned) to the return value from these function, which avoids the -Werror=sign-conversion warnings