Fix warnings detected by -Wwrite-strings
This commit is contained in:
parent
a680d46edf
commit
aeeb3d2c2e
@ -1810,7 +1810,7 @@ g_file_read(int fd, char *ptr, int len)
|
||||
/*****************************************************************************/
|
||||
/* write to file, returns the number of bytes written or -1 on error */
|
||||
int APP_CC
|
||||
g_file_write(int fd, char *ptr, int len)
|
||||
g_file_write(int fd, const char *ptr, int len)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
||||
@ -1947,7 +1947,7 @@ g_get_current_dir(char *dirname, int maxlen)
|
||||
/*****************************************************************************/
|
||||
/* returns error, zero on success and -1 on failure */
|
||||
int APP_CC
|
||||
g_set_current_dir(char *dirname)
|
||||
g_set_current_dir(const char *dirname)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
||||
@ -2116,7 +2116,7 @@ g_strlen(const char *text)
|
||||
|
||||
/*****************************************************************************/
|
||||
/* locates char in text */
|
||||
char* APP_CC
|
||||
const char *APP_CC
|
||||
g_strchr(const char* text, int c)
|
||||
{
|
||||
if (text == NULL)
|
||||
@ -2395,7 +2395,7 @@ g_htoi(char *str)
|
||||
int APP_CC
|
||||
g_pos(const char *str, const char *to_find)
|
||||
{
|
||||
char *pp;
|
||||
const char *pp;
|
||||
|
||||
pp = strstr(str, to_find);
|
||||
|
||||
@ -3263,7 +3263,7 @@ g_save_to_bmp(const char* filename, char* data, int stride_bytes,
|
||||
data -= stride_bytes;
|
||||
if ((depth == 24) && (bits_per_pixel == 32))
|
||||
{
|
||||
line = malloc(file_stride_bytes);
|
||||
line = (char *) malloc(file_stride_bytes);
|
||||
memset(line, 0, file_stride_bytes);
|
||||
for (index = 0; index < height; index++)
|
||||
{
|
||||
|
@ -104,14 +104,14 @@ int APP_CC g_file_open_ex(const char *file_name, int aread, int awrite,
|
||||
int acreate, int atrunc);
|
||||
int APP_CC g_file_close(int fd);
|
||||
int APP_CC g_file_read(int fd, char* ptr, int len);
|
||||
int APP_CC g_file_write(int fd, char* ptr, int len);
|
||||
int APP_CC g_file_write(int fd, const char *ptr, int len);
|
||||
int APP_CC g_file_seek(int fd, int offset);
|
||||
int APP_CC g_file_lock(int fd, int start, int len);
|
||||
int APP_CC g_chmod_hex(const char* filename, int flags);
|
||||
int APP_CC g_chown(const char* name, int uid, int gid);
|
||||
int APP_CC g_mkdir(const char* dirname);
|
||||
char* APP_CC g_get_current_dir(char* dirname, int maxlen);
|
||||
int APP_CC g_set_current_dir(char* dirname);
|
||||
int APP_CC g_set_current_dir(const char *dirname);
|
||||
int APP_CC g_file_exist(const char* filename);
|
||||
int APP_CC g_directory_exist(const char* dirname);
|
||||
int APP_CC g_create_dir(const char* dirname);
|
||||
@ -120,7 +120,7 @@ int APP_CC g_remove_dir(const char* dirname);
|
||||
int APP_CC g_file_delete(const char* filename);
|
||||
int APP_CC g_file_get_size(const char* filename);
|
||||
int APP_CC g_strlen(const char* text);
|
||||
char* APP_CC g_strchr(const char* text, int c);
|
||||
const char *APP_CC g_strchr(const char *text, int c);
|
||||
char* APP_CC g_strcpy(char* dest, const char* src);
|
||||
char* APP_CC g_strncpy(char* dest, const char* src, int len);
|
||||
char* APP_CC g_strcat(char* dest, const char* src);
|
||||
|
@ -111,7 +111,7 @@ ssl_sha1_clear(void *sha1_info)
|
||||
|
||||
/*****************************************************************************/
|
||||
void APP_CC
|
||||
ssl_sha1_transform(void *sha1_info, char *data, int len)
|
||||
ssl_sha1_transform(void *sha1_info, const char *data, int len)
|
||||
{
|
||||
SHA1_Update((SHA_CTX *)sha1_info, data, len);
|
||||
}
|
||||
@ -560,7 +560,7 @@ ssl_tls_create(struct trans *trans, const char *key, const char *cert)
|
||||
|
||||
/*****************************************************************************/
|
||||
int APP_CC
|
||||
ssl_tls_print_error(char *func, SSL *connection, int value)
|
||||
ssl_tls_print_error(const char *func, SSL *connection, int value)
|
||||
{
|
||||
switch (SSL_get_error(connection, value))
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ ssl_sha1_info_delete(void* sha1_info);
|
||||
void APP_CC
|
||||
ssl_sha1_clear(void* sha1_info);
|
||||
void APP_CC
|
||||
ssl_sha1_transform(void* sha1_info, char* data, int len);
|
||||
ssl_sha1_transform(void* sha1_info, const char *data, int len);
|
||||
void APP_CC
|
||||
ssl_sha1_complete(void* sha1_info, char* data);
|
||||
void* APP_CC
|
||||
|
@ -48,7 +48,10 @@ int main(int argc, char **argv)
|
||||
char text[256];
|
||||
char *displayname = NULL;
|
||||
char *outfname;
|
||||
char *sections[8] = {"noshift", "shift", "altgr", "shiftaltgr", "capslock", "capslockaltgr", "shiftcapslock", "shiftcapslockaltgr"};
|
||||
const char *sections[8] = {
|
||||
"noshift", "shift", "altgr", "shiftaltgr",
|
||||
"capslock", "capslockaltgr", "shiftcapslock", "shiftcapslockaltgr"
|
||||
};
|
||||
int states[8] = {0, 1, 0x80, 0x81, 2, 0x82, 3, 0x83};
|
||||
int i;
|
||||
int idx;
|
||||
|
@ -282,7 +282,7 @@ sign_key(char *e_data, int e_len, char *n_data, int n_len,
|
||||
|
||||
/*****************************************************************************/
|
||||
static int APP_CC
|
||||
write_out_line(int fd, char *name, char *data, int len)
|
||||
write_out_line(int fd, const char *name, char *data, int len)
|
||||
{
|
||||
int max;
|
||||
int error;
|
||||
|
@ -1077,7 +1077,7 @@ libxrdp_query_channel(struct xrdp_session *session, int index,
|
||||
/* returns a zero based index of the channel, -1 if error or it doesn't
|
||||
exist */
|
||||
int EXPORT_CC
|
||||
libxrdp_get_channel_id(struct xrdp_session *session, char *name)
|
||||
libxrdp_get_channel_id(struct xrdp_session *session, const char *name)
|
||||
{
|
||||
int index = 0;
|
||||
int count = 0;
|
||||
|
@ -189,7 +189,7 @@ int DEFAULT_CC
|
||||
libxrdp_query_channel(struct xrdp_session *session, int index,
|
||||
char *channel_name, int *channel_flags);
|
||||
int DEFAULT_CC
|
||||
libxrdp_get_channel_id(struct xrdp_session *session, char *name);
|
||||
libxrdp_get_channel_id(struct xrdp_session *session, const char *name);
|
||||
int DEFAULT_CC
|
||||
libxrdp_send_to_channel(struct xrdp_session *session, int channel_id,
|
||||
char *data, int data_len,
|
||||
|
2
mc/mc.c
2
mc/mc.c
@ -75,7 +75,7 @@ lib_mod_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct mod *mod, char *name, char *value)
|
||||
lib_mod_set_param(struct mod *mod, const char *name, char *value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
4
mc/mc.h
4
mc/mc.h
@ -37,7 +37,7 @@ struct mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, char* name, char* value);
|
||||
int (*mod_set_param)(struct mod* v, const char *name, char* value);
|
||||
int (*mod_session_change)(struct mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
@ -80,7 +80,7 @@ struct mod
|
||||
int (*server_query_channel)(struct mod* v, int index,
|
||||
char* channel_name,
|
||||
int* channel_flags);
|
||||
int (*server_get_channel_id)(struct mod* v, char* name);
|
||||
int (*server_get_channel_id)(struct mod* v, const char *name);
|
||||
int (*server_send_to_channel)(struct mod* v, int channel_id,
|
||||
char* data, int data_len,
|
||||
int total_data_len, int flags);
|
||||
|
@ -428,7 +428,7 @@ lxrdp_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
static int DEFAULT_CC
|
||||
lxrdp_set_param(struct mod *mod, char *name, char *value)
|
||||
lxrdp_set_param(struct mod *mod, const char *name, char *value)
|
||||
{
|
||||
rdpSettings *settings;
|
||||
|
||||
|
@ -71,7 +71,7 @@ struct mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod *v);
|
||||
int (*mod_end)(struct mod *v);
|
||||
int (*mod_set_param)(struct mod *v, char *name, char *value);
|
||||
int (*mod_set_param)(struct mod *v, const char *name, char *value);
|
||||
int (*mod_session_change)(struct mod *v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod *v, tbus *read_objs, int *rcount,
|
||||
tbus *write_objs, int *wcount, int *timeout);
|
||||
@ -114,7 +114,7 @@ struct mod
|
||||
int (*server_query_channel)(struct mod *v, int index,
|
||||
char *channel_name,
|
||||
int *channel_flags);
|
||||
int (*server_get_channel_id)(struct mod *v, char *name);
|
||||
int (*server_get_channel_id)(struct mod *v, const char *name);
|
||||
int (*server_send_to_channel)(struct mod *v, int channel_id,
|
||||
char *data, int data_len,
|
||||
int total_data_len, int flags);
|
||||
|
@ -242,7 +242,7 @@ lib_mod_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct mod *mod, char *name, char *value)
|
||||
lib_mod_set_param(struct mod *mod, const char *name, char *value)
|
||||
{
|
||||
if (g_strncasecmp(name, "ip", 255) == 0)
|
||||
{
|
||||
|
@ -262,7 +262,7 @@ struct mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, char* name, char* value);
|
||||
int (*mod_set_param)(struct mod* v, const char *name, char* value);
|
||||
int (*mod_session_change)(struct mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
@ -305,7 +305,7 @@ struct mod
|
||||
int (*server_query_channel)(struct mod* v, int index,
|
||||
char* channel_name,
|
||||
int* channel_flags);
|
||||
int (*server_get_channel_id)(struct mod* v, char* name);
|
||||
int (*server_get_channel_id)(struct mod* v, const char *name);
|
||||
int (*server_send_to_channel)(struct mod* v, int channel_id,
|
||||
char* data, int data_len,
|
||||
int total_data_len, int flags);
|
||||
|
@ -582,7 +582,7 @@ clipboard_send_format_ack(void)
|
||||
/*****************************************************************************/
|
||||
/* returns number of bytes written */
|
||||
int APP_CC
|
||||
clipboard_out_unicode(struct stream *s, char *text, int num_chars)
|
||||
clipboard_out_unicode(struct stream *s, const char *text, int num_chars)
|
||||
{
|
||||
int index;
|
||||
int lnum_chars;
|
||||
|
@ -127,7 +127,8 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */
|
||||
char cFileName[256];
|
||||
};
|
||||
|
||||
int APP_CC clipboard_out_unicode(struct stream *s, char *text, int num_chars);
|
||||
int APP_CC clipboard_out_unicode(struct stream *s, const char *text,
|
||||
int num_chars);
|
||||
int APP_CC clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
|
||||
|
||||
#endif
|
||||
|
@ -164,7 +164,7 @@ scp_session_set_rsr(struct SCP_SESSION *s, tui8 rsr)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_locale(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_locale(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -180,7 +180,7 @@ scp_session_set_locale(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_username(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_username(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -206,7 +206,7 @@ scp_session_set_username(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_password(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_password(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -232,7 +232,7 @@ scp_session_set_password(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_domain(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_domain(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -258,7 +258,7 @@ scp_session_set_domain(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_program(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_program(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -284,7 +284,7 @@ scp_session_set_program(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_directory(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_directory(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -310,7 +310,7 @@ scp_session_set_directory(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_client_ip(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_client_ip(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -336,7 +336,7 @@ scp_session_set_client_ip(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_hostname(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_hostname(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
@ -362,7 +362,7 @@ scp_session_set_hostname(struct SCP_SESSION *s, char *str)
|
||||
|
||||
/*******************************************************************/
|
||||
int
|
||||
scp_session_set_errstr(struct SCP_SESSION *s, char *str)
|
||||
scp_session_set_errstr(struct SCP_SESSION *s, const char *str)
|
||||
{
|
||||
if (0 == str)
|
||||
{
|
||||
|
@ -59,28 +59,28 @@ int
|
||||
scp_session_set_rsr(struct SCP_SESSION* s, tui8 rsr);
|
||||
|
||||
int
|
||||
scp_session_set_locale(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_locale(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_username(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_username(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_password(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_password(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_domain(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_domain(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_program(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_program(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_directory(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_directory(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_client_ip(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_client_ip(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_hostname(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_hostname(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
int
|
||||
scp_session_set_addr(struct SCP_SESSION* s, int type, const void* addr);
|
||||
@ -89,7 +89,7 @@ int
|
||||
scp_session_set_display(struct SCP_SESSION* s, SCP_DISPLAY display);
|
||||
|
||||
int
|
||||
scp_session_set_errstr(struct SCP_SESSION* s, char* str);
|
||||
scp_session_set_errstr(struct SCP_SESSION* s, const char *str);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -202,7 +202,7 @@ enum SCP_SERVER_STATES_E scp_v1s_accept(struct SCP_CONNECTION *c, struct SCP_SES
|
||||
}
|
||||
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_deny_connection(struct SCP_CONNECTION *c, char *reason)
|
||||
scp_v1s_deny_connection(struct SCP_CONNECTION *c, const char *reason)
|
||||
{
|
||||
int rlen;
|
||||
|
||||
@ -235,7 +235,8 @@ scp_v1s_deny_connection(struct SCP_CONNECTION *c, char *reason)
|
||||
}
|
||||
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_request_password(struct SCP_CONNECTION *c, struct SCP_SESSION *s, char *reason)
|
||||
scp_v1s_request_password(struct SCP_CONNECTION *c, struct SCP_SESSION *s,
|
||||
const char *reason)
|
||||
{
|
||||
tui8 sz;
|
||||
tui32 version;
|
||||
@ -392,7 +393,7 @@ scp_v1s_connect_new_session(struct SCP_CONNECTION *c, SCP_DISPLAY d)
|
||||
|
||||
/* 032 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_connection_error(struct SCP_CONNECTION *c, char *error)
|
||||
scp_v1s_connection_error(struct SCP_CONNECTION *c, const char *error)
|
||||
{
|
||||
tui16 len;
|
||||
|
||||
|
@ -53,10 +53,11 @@ scp_v1s_accept(struct SCP_CONNECTION* c, struct SCP_SESSION** s, int skipVchk);
|
||||
*/
|
||||
/* 002 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_deny_connection(struct SCP_CONNECTION* c, char* reason);
|
||||
scp_v1s_deny_connection(struct SCP_CONNECTION* c, const char *reason);
|
||||
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_request_password(struct SCP_CONNECTION* c, struct SCP_SESSION* s, char* reason);
|
||||
scp_v1s_request_password(struct SCP_CONNECTION* c, struct SCP_SESSION* s,
|
||||
const char *reason);
|
||||
|
||||
/* 020 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
@ -72,7 +73,7 @@ scp_v1s_connect_new_session(struct SCP_CONNECTION* c, SCP_DISPLAY d);
|
||||
|
||||
/* 032 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_connection_error(struct SCP_CONNECTION* c, char* error);
|
||||
scp_v1s_connection_error(struct SCP_CONNECTION* c, const char *error);
|
||||
|
||||
/* 040 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
|
@ -138,7 +138,7 @@ scp_v1s_mng_allow_connection(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
|
||||
|
||||
/* 003 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_mng_deny_connection(struct SCP_CONNECTION *c, char *reason)
|
||||
scp_v1s_mng_deny_connection(struct SCP_CONNECTION *c, const char *reason)
|
||||
{
|
||||
int rlen;
|
||||
|
||||
|
@ -61,7 +61,7 @@ scp_v1s_mng_allow_connection(struct SCP_CONNECTION* c, struct SCP_SESSION* s);
|
||||
*/
|
||||
/* 003 */
|
||||
enum SCP_SERVER_STATES_E
|
||||
scp_v1s_mng_deny_connection(struct SCP_CONNECTION* c, char* reason);
|
||||
scp_v1s_mng_deny_connection(struct SCP_CONNECTION* c, const char *reason);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
extern struct config_sesman *g_cfg; /* in sesman.c */
|
||||
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, char *f);
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f);
|
||||
|
||||
/******************************************************************************/
|
||||
void DEFAULT_CC
|
||||
@ -209,7 +209,7 @@ scp_v1_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
|
||||
g_free(slist);
|
||||
}
|
||||
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, char *f)
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
extern struct config_sesman *g_cfg; /* in sesman.c */
|
||||
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, char *f);
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f);
|
||||
|
||||
/******************************************************************************/
|
||||
void DEFAULT_CC
|
||||
@ -109,7 +109,7 @@ scp_v1_mng_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
|
||||
auth_end(data);
|
||||
}
|
||||
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, char *f)
|
||||
static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
|
@ -1396,7 +1396,7 @@ lib_mod_end(struct vnc *v)
|
||||
|
||||
/******************************************************************************/
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct vnc *v, char *name, char *value)
|
||||
lib_mod_set_param(struct vnc *v, const char *name, char *value)
|
||||
{
|
||||
if (g_strcasecmp(name, "username") == 0)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ struct vnc
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct vnc* v);
|
||||
int (*mod_end)(struct vnc* v);
|
||||
int (*mod_set_param)(struct vnc* v, char* name, char* value);
|
||||
int (*mod_set_param)(struct vnc* v, const char *name, char* value);
|
||||
int (*mod_session_change)(struct vnc* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct vnc* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
@ -54,7 +54,7 @@ struct vnc
|
||||
char* data, int width, int height, int srcx, int srcy);
|
||||
int (*server_set_cursor)(struct vnc* v, int x, int y, char* data, char* mask);
|
||||
int (*server_palette)(struct vnc* v, int* palette);
|
||||
int (*server_msg)(struct vnc* v, char* msg, int code);
|
||||
int (*server_msg)(struct vnc* v, const char *msg, int code);
|
||||
int (*server_is_term)(struct vnc* v);
|
||||
int (*server_set_clip)(struct vnc* v, int x, int y, int cx, int cy);
|
||||
int (*server_reset_clip)(struct vnc* v);
|
||||
@ -80,7 +80,7 @@ struct vnc
|
||||
int (*server_query_channel)(struct vnc* v, int index,
|
||||
char* channel_name,
|
||||
int* channel_flags);
|
||||
int (*server_get_channel_id)(struct vnc* v, char* name);
|
||||
int (*server_get_channel_id)(struct vnc* v, const char *name);
|
||||
int (*server_send_to_channel)(struct vnc* v, int channel_id,
|
||||
char* data, int data_len,
|
||||
int total_data_len, int flags);
|
||||
|
@ -266,9 +266,9 @@ xrdp_painter_draw_bitmap(struct xrdp_painter* self,
|
||||
struct xrdp_bitmap* to_draw,
|
||||
int x, int y, int cx, int cy);
|
||||
int APP_CC
|
||||
xrdp_painter_text_width(struct xrdp_painter* self, char* text);
|
||||
xrdp_painter_text_width(struct xrdp_painter* self, const char *text);
|
||||
int APP_CC
|
||||
xrdp_painter_text_height(struct xrdp_painter* self, char* text);
|
||||
xrdp_painter_text_height(struct xrdp_painter* self, const char *text);
|
||||
int APP_CC
|
||||
xrdp_painter_draw_text(struct xrdp_painter* self,
|
||||
struct xrdp_bitmap* bitmap,
|
||||
@ -466,7 +466,7 @@ int DEFAULT_CC
|
||||
server_query_channel(struct xrdp_mod* mod, int index, char* channel_name,
|
||||
int* channel_flags);
|
||||
int DEFAULT_CC
|
||||
server_get_channel_id(struct xrdp_mod* mod, char* name);
|
||||
server_get_channel_id(struct xrdp_mod* mod, const char *name);
|
||||
int DEFAULT_CC
|
||||
server_send_to_channel(struct xrdp_mod* mod, int channel_id,
|
||||
char* data, int data_len,
|
||||
|
@ -291,7 +291,8 @@ xrdp_mm_send_login(struct xrdp_mm *self)
|
||||
then it copies the corresponding login_values item into 'dest'
|
||||
'dest' must be at least 'dest_len' + 1 bytes in size */
|
||||
static int APP_CC
|
||||
xrdp_mm_get_value(struct xrdp_mm *self, char *aname, char *dest, int dest_len)
|
||||
xrdp_mm_get_value(struct xrdp_mm *self, const char *aname, char *dest,
|
||||
int dest_len)
|
||||
{
|
||||
char *name;
|
||||
char *value;
|
||||
@ -1111,7 +1112,7 @@ xrdp_mm_chan_send_init(struct xrdp_mm *self)
|
||||
/*****************************************************************************/
|
||||
/* connect to chansrv */
|
||||
static int APP_CC
|
||||
xrdp_mm_connect_chansrv(struct xrdp_mm *self, char *ip, char *port)
|
||||
xrdp_mm_connect_chansrv(struct xrdp_mm *self, const char *ip, const char *port)
|
||||
{
|
||||
int index;
|
||||
|
||||
@ -3145,7 +3146,7 @@ server_query_channel(struct xrdp_mod *mod, int index, char *channel_name,
|
||||
/*****************************************************************************/
|
||||
/* returns -1 on error */
|
||||
int DEFAULT_CC
|
||||
server_get_channel_id(struct xrdp_mod *mod, char *name)
|
||||
server_get_channel_id(struct xrdp_mod *mod, const char *name)
|
||||
{
|
||||
struct xrdp_wm *wm;
|
||||
|
||||
|
@ -262,7 +262,7 @@ xrdp_painter_rop(int rop, int src, int dst)
|
||||
|
||||
/*****************************************************************************/
|
||||
int APP_CC
|
||||
xrdp_painter_text_width(struct xrdp_painter *self, char *text)
|
||||
xrdp_painter_text_width(struct xrdp_painter *self, const char *text)
|
||||
{
|
||||
int index;
|
||||
int rv;
|
||||
@ -299,7 +299,7 @@ xrdp_painter_text_width(struct xrdp_painter *self, char *text)
|
||||
|
||||
/*****************************************************************************/
|
||||
int APP_CC
|
||||
xrdp_painter_text_height(struct xrdp_painter *self, char *text)
|
||||
xrdp_painter_text_height(struct xrdp_painter *self, const char *text)
|
||||
{
|
||||
int index;
|
||||
int rv;
|
||||
|
@ -42,7 +42,7 @@ struct xrdp_mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct xrdp_mod* v);
|
||||
int (*mod_end)(struct xrdp_mod* v);
|
||||
int (*mod_set_param)(struct xrdp_mod* v, char* name, char* value);
|
||||
int (*mod_set_param)(struct xrdp_mod* v, const char *name, char* value);
|
||||
int (*mod_session_change)(struct xrdp_mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct xrdp_mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
@ -88,7 +88,7 @@ struct xrdp_mod
|
||||
int (*server_query_channel)(struct xrdp_mod* v, int index,
|
||||
char* channel_name,
|
||||
int* channel_flags);
|
||||
int (*server_get_channel_id)(struct xrdp_mod* v, char* name);
|
||||
int (*server_get_channel_id)(struct xrdp_mod* v, const char *name);
|
||||
int (*server_send_to_channel)(struct xrdp_mod* v, int channel_id,
|
||||
char* data, int data_len,
|
||||
int total_data_len, int flags);
|
||||
|
@ -548,7 +548,7 @@ xrdp_wm_init(struct xrdp_wm *self)
|
||||
struct list *names;
|
||||
struct list *values;
|
||||
char *q;
|
||||
char *r;
|
||||
const char *r;
|
||||
char param[256];
|
||||
char section_name[256];
|
||||
char cfg_file[256];
|
||||
|
@ -1479,7 +1479,7 @@ lib_mod_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct mod *mod, char *name, char *value)
|
||||
lib_mod_set_param(struct mod *mod, const char *name, char *value)
|
||||
{
|
||||
if (g_strcasecmp(name, "username") == 0)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ struct mod
|
||||
tbus param3, tbus param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, char* name, char* value);
|
||||
int (*mod_set_param)(struct mod* v, const char *name, char* value);
|
||||
int (*mod_session_change)(struct mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
@ -58,7 +58,7 @@ struct mod
|
||||
int srcx, int srcy);
|
||||
int (*server_set_cursor)(struct mod* v, int x, int y, char* data, char* mask);
|
||||
int (*server_palette)(struct mod* v, int* palette);
|
||||
int (*server_msg)(struct mod* v, char* msg, int code);
|
||||
int (*server_msg)(struct mod* v, const char *msg, int code);
|
||||
int (*server_is_term)(struct mod* v);
|
||||
int (*server_set_clip)(struct mod* v, int x, int y, int cx, int cy);
|
||||
int (*server_reset_clip)(struct mod* v);
|
||||
@ -84,7 +84,7 @@ struct mod
|
||||
int (*server_query_channel)(struct mod* v, int index,
|
||||
char* channel_name,
|
||||
int* channel_flags);
|
||||
int (*server_get_channel_id)(struct mod* v, char* name);
|
||||
int (*server_get_channel_id)(struct mod* v, const char *name);
|
||||
int (*server_send_to_channel)(struct mod* v, int channel_id,
|
||||
char* data, int data_len,
|
||||
int total_data_len, int flags);
|
||||
|
Loading…
Reference in New Issue
Block a user