]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
unit1651: Fixed conversion compilation warning
authorSteve Holme <steve_holme@hotmail.com>
Sun, 1 Mar 2020 02:43:28 +0000 (02:43 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 1 Mar 2020 15:10:28 +0000 (15:10 +0000)
371:17: warning: conversion to 'unsigned char' from 'int' may alter its
        value [-Wconversion]

Closes #5008

tests/unit/unit1651.c

index 3652601f99a835fab0b454fc1a3de8c7d0f919f5..44dbf4b51b69eb479d73b214420e6059837c8734 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -368,7 +368,7 @@ UNITTEST_START
   for(byte = 1 ; byte < 255; byte += 17) {
     for(i = 0; i < 45; i++) {
       char backup = cert[i];
-      cert[i] = (unsigned char)byte&0xff;
+      cert[i] = (unsigned char) (byte & 0xff);
       (void) Curl_extract_certinfo(&conn, 0, beg, end);
       cert[i] = backup;
     }