dm crypt: fixed compiler warning in conditional expression
PATCH 1/1 dm crypt: fixed compiler warning in conditional expression
Explicitly converting unsigned int in the right of the conditional expression to int to match the left side operand and the return type, fixing the following compiler warning:
drivers/md/dm-crypt.c:2593:43: warning: signed and unsigned type in conditional expression [-Wsign-compare]
Signed-off-by Aashish Sharma <[email protected]>
--- drivers/md/dm-crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/dm-crypt.c +2 -1
@@ -2590,7 +2590,8 @@ static int crypt_set_keyring_key(struct crypt_config *cc, const char *key_stringstatic int get_key_size (char **key_string) { -return (*key_string[0 ] ==':' ) ? -EINVAL :strlen (*key_string) >>1 ; +return (*key_string[0 ] ==':' ) ? -EINVAL + : (int )(strlen (*key_string) >>1 ); }#endif /* CONFIG_KEYS */
Signature · 1 line
2.35.1.265.g69c8d7142f-goog