]> granicus.if.org Git - gc/commitdiff
Eliminate 'conversion may lose significant digits' BCC warning in de_win
authorIvan Maidanski <ivmai@mail.ru>
Tue, 16 Jul 2019 21:44:29 +0000 (00:44 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 16 Jul 2019 21:44:29 +0000 (00:44 +0300)
* cord/tests/de_win.c (control_chars): Cast text[i]+0x40 to char.

cord/tests/de_win.c

index 2d2c528d224dc874323faf1fe4de67a143781648..e51c3b651f8240e51394cb81bd51a315be4d296a 100644 (file)
@@ -156,7 +156,7 @@ char * control_chars(char * text, size_t len)
     if (NULL == result) return NULL;
     for (i = 0; i < len; i++) {
        if (iscntrl(((unsigned char *)text)[i])) {
-           result[i] = text[i] + 0x40;
+           result[i] = (char)(text[i] + 0x40);
        } else {
            result[i] = ' ';
        }