mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
b64: add downcasts for gcc 4.4
gcc 4.4 complains with the following: warning: conversion to 'char' from 'int' may alter its value After the explicit cast the warning is gone.
This commit is contained in:
parent
e5944a7da2
commit
630d768419
1 changed files with 2 additions and 2 deletions
|
@ -72,9 +72,9 @@ _lws_b64_encode_string(const char *encode, const char *in, int in_len,
|
|||
*out++ = encode[triple[0] >> 2];
|
||||
*out++ = encode[(((triple[0] & 0x03) << 4) & 0x30) |
|
||||
(((triple[1] & 0xf0) >> 4) & 0x0f)];
|
||||
*out++ = (len > 1 ? encode[(((triple[1] & 0x0f) << 2) & 0x3c) |
|
||||
*out++ = (char)(len > 1 ? encode[(((triple[1] & 0x0f) << 2) & 0x3c) |
|
||||
(((triple[2] & 0xc0) >> 6) & 3)] : '=');
|
||||
*out++ = (len > 2 ? encode[triple[2] & 0x3f] : '=');
|
||||
*out++ = (char)(len > 2 ? encode[triple[2] & 0x3f] : '=');
|
||||
|
||||
done += 4;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue