Use const unsigned for hex arrays

Some constants are too big for the signed type.
This commit is contained in:
Pavel Roskin 2016-06-21 16:30:17 -07:00
parent aeeb3d2c2e
commit aaa89ad4e6
5 changed files with 13 additions and 11 deletions

View File

@ -312,7 +312,7 @@ rdp_rdp_out_colcache_caps(struct rdp_rdp *self, struct stream *s)
return 0;
}
static char caps_0x0d[] =
static const unsigned char caps_0x0d[] =
{
0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -327,11 +327,11 @@ static char caps_0x0d[] =
0x00, 0x00, 0x00, 0x00
};
static char caps_0x0c[] = { 0x01, 0x00, 0x00, 0x00 };
static const unsigned char caps_0x0c[] = { 0x01, 0x00, 0x00, 0x00 };
static char caps_0x0e[] = { 0x01, 0x00, 0x00, 0x00 };
static const unsigned char caps_0x0e[] = { 0x01, 0x00, 0x00, 0x00 };
static char caps_0x10[] =
static const unsigned char caps_0x10[] =
{
0xFE, 0x00, 0x04, 0x00, 0xFE, 0x00, 0x04, 0x00,
0xFE, 0x00, 0x08, 0x00, 0xFE, 0x00, 0x08, 0x00,
@ -345,7 +345,7 @@ static char caps_0x10[] =
/* Output unknown capability sets */
static int APP_CC
rdp_rdp_out_unknown_caps(struct rdp_rdp *self, struct stream *s, int id,
int length, char *caps)
int length, const unsigned char *caps)
{
out_uint16_le(s, id);
out_uint16_le(s, length);

View File

@ -55,7 +55,7 @@ static tbus g_thread_done_event = 0;
static int g_use_unix_socket = 0;
static char g_xrdpapi_magic[12] =
static const unsigned char g_xrdpapi_magic[12] =
{ 0x78, 0x32, 0x10, 0x67, 0x00, 0x92, 0x30, 0x56, 0xff, 0xd8, 0xa9, 0x1f };
int g_display_num = 0;

View File

@ -1148,8 +1148,8 @@ rail_data_in(struct stream *s, int chan_id, int chan_flags, int length,
return 0;
}
static int g_crc_seed = 0xffffffff;
static int g_crc_table[256] =
static const unsigned int g_crc_seed = 0xffffffff;
static const unsigned int g_crc_table[256] =
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,

View File

@ -38,7 +38,7 @@
while (0)
static const int g_crc_table[256] =
static const unsigned int g_crc_table[256] =
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,

View File

@ -53,8 +53,10 @@ static int send_init(struct wts_obj *wts);
static int can_send(int sck, int millis);
static int can_recv(int sck, int millis);
static char g_xrdpapi_magic[12] =
{ 0x78, 0x32, 0x10, 0x67, 0x00, 0x92, 0x30, 0x56, 0xff, 0xd8, 0xa9, 0x1f };
static const unsigned char g_xrdpapi_magic[12] =
{
0x78, 0x32, 0x10, 0x67, 0x00, 0x92, 0x30, 0x56, 0xff, 0xd8, 0xa9, 0x1f
};
/*
* Opens a handle to the server end of a specified virtual channel - this