Fix all format warnings and some unused variable warnings

ulab-next-nosound
Jay Sorg 9 years ago
parent 7393579205
commit 38241f2a0b

@ -253,8 +253,8 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
{ {
/*This situation can happen and this is a workaround*/ /*This situation can happen and this is a workaround*/
cont = 0; cont = 0;
g_writeln("Serious programming error we were locked in a deadly loop") ; g_writeln("Serious programming error: we were locked in a deadly loop");
g_writeln("remaining :%d", s->end - s->next_packet); g_writeln("Remaining: %d", (int) (s->end - s->next_packet));
s->next_packet = 0; s->next_packet = 0;
} }
@ -1298,7 +1298,6 @@ libxrdp_fastpath_send_surface(struct xrdp_session *session,
struct stream ls; struct stream ls;
struct stream *s; struct stream *s;
struct xrdp_rdp *rdp; struct xrdp_rdp *rdp;
int rv;
int sec_bytes; int sec_bytes;
int rdp_bytes; int rdp_bytes;
int max_bytes; int max_bytes;

@ -562,7 +562,8 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
in_uint16_le(s, len); in_uint16_le(s, len);
if ((len < 4) || !s_check_rem(s, len - 4)) if ((len < 4) || !s_check_rem(s, len - 4))
{ {
g_writeln("xrdp_caps_process_confirm_active: error len %d", len, s->end - s->p); g_writeln("xrdp_caps_process_confirm_active: error: len %d, "
"remaining %d", len, (int) (s->end - s->p));
return 1; return 1;
} }
len -= 4; len -= 4;

@ -419,7 +419,7 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
} }
else else
{ {
LLOGLN(0, ("xrdp_load_keyboard_layout: error opening %d", LLOGLN(0, ("xrdp_load_keyboard_layout: error opening %s",
keyboard_cfg_file)); keyboard_cfg_file));
} }
} }

@ -73,6 +73,7 @@ rdp_lic_generate_hwid(struct rdp_lic *self, char *hwid)
LICENCE_HWID_SIZE - 4); LICENCE_HWID_SIZE - 4);
} }
#if 0
/*****************************************************************************/ /*****************************************************************************/
/* Present an existing licence to the server */ /* Present an existing licence to the server */
static void APP_CC static void APP_CC
@ -112,6 +113,7 @@ rdp_lic_present(struct rdp_lic *self, char *client_random, char *rsa_data,
rdp_sec_send(self->sec_layer, s, sec_flags); rdp_sec_send(self->sec_layer, s, sec_flags);
free_stream(s); free_stream(s);
} }
#endif
/*****************************************************************************/ /*****************************************************************************/
/* Send a licence request packet */ /* Send a licence request packet */
@ -161,13 +163,7 @@ rdp_lic_process_demand(struct rdp_lic *self, struct stream *s)
{ {
char null_data[SEC_MODULUS_SIZE]; char null_data[SEC_MODULUS_SIZE];
char *server_random; char *server_random;
char signature[LICENCE_SIGNATURE_SIZE];
char hwid[LICENCE_HWID_SIZE];
char *licence_data;
int licence_size;
void *crypt_key;
licence_data = 0;
/* Retrieve the server random from the incoming packet */ /* Retrieve the server random from the incoming packet */
in_uint8p(s, server_random, SEC_RANDOM_SIZE); in_uint8p(s, server_random, SEC_RANDOM_SIZE);
/* We currently use null client keys. This is a bit naughty but, hey, /* We currently use null client keys. This is a bit naughty but, hey,
@ -176,10 +172,17 @@ rdp_lic_process_demand(struct rdp_lic *self, struct stream *s)
rdp_lic_generate_keys(self, null_data, server_random, null_data); rdp_lic_generate_keys(self, null_data, server_random, null_data);
#if 0 #if 0
int licence_size;
char *licence_data;
licence_size = 0; /* todo load_licence(&licence_data); */ licence_size = 0; /* todo load_licence(&licence_data); */
if (licence_size > 0) if (licence_size > 0)
{ {
void *crypt_key;
char hwid[LICENCE_HWID_SIZE];
char signature[LICENCE_SIGNATURE_SIZE];
/* Generate a signature for the HWID buffer */ /* Generate a signature for the HWID buffer */
rdp_lic_generate_hwid(self, hwid); rdp_lic_generate_hwid(self, hwid);
rdp_sec_sign(signature, 16, self->licence_sign_key, 16, rdp_sec_sign(signature, 16, self->licence_sign_key, 16,

@ -326,15 +326,13 @@ rdp_orders_process_bmpcache(struct rdp_orders *self, struct stream *s,
int bpp = 0; int bpp = 0;
int Bpp = 0; int Bpp = 0;
int bufsize = 0; int bufsize = 0;
int pad1 = 0;
int pad2 = 0;
int row_size = 0; int row_size = 0;
int final_size = 0; int final_size = 0;
struct rdp_bitmap *bitmap = (struct rdp_bitmap *)NULL; struct rdp_bitmap *bitmap = (struct rdp_bitmap *)NULL;
struct stream *rec_s = (struct stream *)NULL; struct stream *rec_s = (struct stream *)NULL;
in_uint8(s, cache_id); in_uint8(s, cache_id);
in_uint8(s, pad1); in_uint8s(s, 1); /* pad */
in_uint8(s, width); in_uint8(s, width);
in_uint8(s, height); in_uint8(s, height);
in_uint8(s, bpp); in_uint8(s, bpp);
@ -348,7 +346,7 @@ rdp_orders_process_bmpcache(struct rdp_orders *self, struct stream *s,
} }
else else
{ {
in_uint16_le(s, pad2); in_uint8s(s, 2); /* pad */
in_uint16_le(s, size); in_uint16_le(s, size);
in_uint16_le(s, row_size); in_uint16_le(s, row_size);
in_uint16_le(s, final_size); in_uint16_le(s, final_size);
@ -1115,8 +1113,8 @@ static void APP_CC
rdp_orders_process_desksave(struct rdp_orders *self, struct stream *s, rdp_orders_process_desksave(struct rdp_orders *self, struct stream *s,
int present, int delta) int present, int delta)
{ {
int width = 0; //int width = 0;
int height = 0; //int height = 0;
if (present & 0x01) if (present & 0x01)
{ {

@ -46,7 +46,6 @@ sesman_main_loop(void)
int error; int error;
int robjs_count; int robjs_count;
int cont; int cont;
int pid;
tbus sck_obj; tbus sck_obj;
tbus robjs[8]; tbus robjs[8];

@ -115,7 +115,7 @@ main(int argc, char **argv)
{ {
in_uint16_be(in_s, data); in_uint16_be(in_s, data);
in_uint16_be(in_s, display); in_uint16_be(in_s, display);
g_printf("ok %d display %d\n", data, display); g_printf("ok %d display %d\n", (int)data, display);
} }
} }
} }

@ -201,8 +201,8 @@ int inputSession(struct SCP_SESSION *s)
} }
g_printf("session type:\n"); g_printf("session type:\n");
g_printf("0: Xvnc\n", SCP_SESSION_TYPE_XVNC); g_printf("%d: Xvnc\n", SCP_SESSION_TYPE_XVNC);
g_printf("1: x11rdp\n", SCP_SESSION_TYPE_XRDP); g_printf("%d: x11rdp\n", SCP_SESSION_TYPE_XRDP);
integer = menuSelect(1); integer = menuSelect(1);
if (integer == 1) if (integer == 1)

@ -107,7 +107,7 @@ xrdp_shutdown(int sig)
threadid = tc_get_threadid(); threadid = tc_get_threadid();
g_writeln("shutting down"); g_writeln("shutting down");
g_writeln("signal %d threadid %p", sig, threadid); g_writeln("signal %d threadid %lld", sig, (long long)threadid);
if (!g_is_wait_obj_set(g_term_event)) if (!g_is_wait_obj_set(g_term_event))
{ {

Loading…
Cancel
Save