aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/file_dlg_win32.c28
-rw-r--r--gtk/funnel_stat.c8
-rw-r--r--gtk/print_win32.c13
-rw-r--r--gtk/rtp_stream_dlg.c2
-rw-r--r--gtk/stats_tree_stat.c2
-rw-r--r--gtk/supported_protos_dlg.c18
-rw-r--r--gtk/text_page_utils.c2
-rw-r--r--gtk/u3.c2
-rw-r--r--gtk/uat_gui.c6
-rw-r--r--gtk/voip_calls_dlg.c4
10 files changed, 43 insertions, 42 deletions
diff --git a/gtk/file_dlg_win32.c b/gtk/file_dlg_win32.c
index 62ee9d124b..ed54477420 100644
--- a/gtk/file_dlg_win32.c
+++ b/gtk/file_dlg_win32.c
@@ -99,11 +99,11 @@ typedef enum {
#define FILE_DEFAULT_COLOR 2
-static UINT CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
-static UINT CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
-static UINT CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
-static UINT CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
-static UINT CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT_PTR CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT_PTR CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT_PTR CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT_PTR CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT_PTR CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
static void range_update_dynamics(HWND sf_hwnd, packet_range_t *range);
static void range_handle_wm_initdialog(HWND dlg_hwnd, packet_range_t *range);
static void range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t *range);
@@ -1108,7 +1108,7 @@ filter_tb_syntax_check(HWND hwnd, TCHAR *filter_text) {
}
-static UINT CALLBACK
+static UINT_PTR CALLBACK
open_file_hook_proc(HWND of_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
HWND cur_ctrl, parent;
OFNOTIFY *notify = (OFNOTIFY *) l_param;
@@ -1270,10 +1270,10 @@ build_file_type_list(gboolean save, int *item_to_select) {
/* append the "All Files" entry */
if (!save) {
str16 = utf_8to16("All Files (*.*)");
- sa = g_array_append_vals(sa, str16, strlen("All Files (*.*)"));
+ sa = g_array_append_vals(sa, str16, (guint) strlen("All Files (*.*)"));
sa = g_array_append_val(sa, zero);
str16 = utf_8to16("*.*");
- sa = g_array_append_vals(sa, str16, strlen("*.*"));
+ sa = g_array_append_vals(sa, str16, (guint) strlen("*.*"));
sa = g_array_append_val(sa, zero);
}
@@ -1293,12 +1293,12 @@ build_file_type_list(gboolean save, int *item_to_select) {
continue;
}
str16 = utf_8to16(str->str);
- sa = g_array_append_vals(sa, str16, strlen(str->str));
+ sa = g_array_append_vals(sa, str16, (guint) strlen(str->str));
sa = g_array_append_val(sa, zero);
g_string_printf(str, "%s", wtap_file_extensions_string(ft));
str16 = utf_8to16(str->str);
- sa = g_array_append_vals(sa, str16, strlen(str->str));
+ sa = g_array_append_vals(sa, str16, (guint) strlen(str->str));
sa = g_array_append_val(sa, zero);
if (ft == cfile.cd_t && item_to_select != NULL) {
@@ -1361,7 +1361,7 @@ build_file_format_list(HWND sf_hwnd) {
#endif
#define RANGE_TEXT_MAX 128
-static UINT CALLBACK
+static UINT_PTR CALLBACK
save_as_file_hook_proc(HWND sf_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
HWND cur_ctrl;
OFNOTIFY *notify = (OFNOTIFY *) l_param;
@@ -1605,7 +1605,7 @@ range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t
}
}
-static UINT CALLBACK
+static UINT_PTR CALLBACK
merge_file_hook_proc(HWND mf_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
HWND cur_ctrl, parent;
OFNOTIFY *notify = (OFNOTIFY *) l_param;
@@ -1675,7 +1675,7 @@ merge_file_hook_proc(HWND mf_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
}
-static UINT CALLBACK
+static UINT_PTR CALLBACK
export_file_hook_proc(HWND ef_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
HWND cur_ctrl;
OFNOTIFY *notify = (OFNOTIFY *) l_param;
@@ -1733,7 +1733,7 @@ export_file_hook_proc(HWND ef_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
return 0;
}
-static UINT CALLBACK
+static UINT_PTR CALLBACK
export_raw_file_hook_proc(HWND ef_hwnd, UINT msg, WPARAM w_param, LPARAM l_param) {
HWND cur_ctrl;
OPENFILENAME *ofnp = (OPENFILENAME *) l_param;
diff --git a/gtk/funnel_stat.c b/gtk/funnel_stat.c
index 3510791fb6..04ac600b1d 100644
--- a/gtk/funnel_stat.c
+++ b/gtk/funnel_stat.c
@@ -225,14 +225,14 @@ static void text_window_clear(funnel_text_window_t* tw)
static void text_window_append(funnel_text_window_t* tw, const char *str)
{
GtkWidget *txt;
- int nchars = strlen(str);
+ int nchars;
GtkTextBuffer *buf;
GtkTextIter iter;
if (! tw->win) return;
txt = tw->txt;
- nchars = strlen(str);
+ nchars = (int) strlen(str);
buf= gtk_text_view_get_buffer(GTK_TEXT_VIEW(txt));
@@ -258,14 +258,14 @@ static void text_window_set_text(funnel_text_window_t* tw, const gchar* text)
static void text_window_prepend(funnel_text_window_t* tw, const char *str _U_) {
GtkWidget *txt;
- int nchars = strlen(str);
+ int nchars;
GtkTextBuffer *buf;
GtkTextIter iter;
if (! tw->win) return;
txt = tw->txt;
- nchars = strlen(str);
+ nchars = (int) strlen(str);
buf= gtk_text_view_get_buffer(GTK_TEXT_VIEW(txt));
diff --git a/gtk/print_win32.c b/gtk/print_win32.c
index b82166f482..36940b1a5b 100644
--- a/gtk/print_win32.c
+++ b/gtk/print_win32.c
@@ -176,7 +176,8 @@ static void print_file( char *file_name, HDC hdc) {
#define x_offset 5
FILE* fh1;
- int results, cnt=0, y_pos = y_offset, y_cnt = 0;
+ size_t results;
+ int cnt=0, y_pos = y_offset, y_cnt = 0;
char buf[ max_buf_size];
char ch;
TEXTMETRIC tm;
@@ -197,8 +198,8 @@ static void print_file( char *file_name, HDC hdc) {
/* end of page (form feed)? */
if ( ch == 0x0c){
/* send buffer */
- buf[ cnt] = 0;
- TextOut(hdc, x_offset,y_pos, buf, strlen(buf));
+ buf[cnt] = 0;
+ TextOut(hdc, x_offset,y_pos, buf, (int) strlen(buf));
y_pos += tm.tmHeight;
cnt = 0;
@@ -214,7 +215,7 @@ static void print_file( char *file_name, HDC hdc) {
if ( ch == 0x0a){
/* send buffer */
buf[ cnt] = 0;
- TextOut(hdc, x_offset,y_pos, buf, strlen(buf));
+ TextOut(hdc, x_offset,y_pos, buf, (int) strlen(buf));
y_pos += tm.tmHeight;
cnt = 0;
/* last line on page? -> reset page */
@@ -231,7 +232,7 @@ static void print_file( char *file_name, HDC hdc) {
if ( cnt == ( max_buf_size - 1)) {
/* send buffer */
buf[ cnt] = 0;
- TextOut(hdc, x_offset, y_pos, buf, strlen(buf));
+ TextOut(hdc, x_offset, y_pos, buf, (int) strlen(buf));
y_pos += tm.tmHeight;
cnt = 0;
/* last line on page? -> reset page */
@@ -250,7 +251,7 @@ static void print_file( char *file_name, HDC hdc) {
/* Print the remaining text if needed */
if ( cnt > 0) {
buf[ cnt] = 0;
- TextOut(hdc, 0,y_pos, buf, strlen(buf));
+ TextOut(hdc, 0,y_pos, buf, (int) strlen(buf));
}
fclose(fh1);
diff --git a/gtk/rtp_stream_dlg.c b/gtk/rtp_stream_dlg.c
index 87b713dda5..6589ec2fe1 100644
--- a/gtk/rtp_stream_dlg.c
+++ b/gtk/rtp_stream_dlg.c
@@ -451,7 +451,7 @@ rtpstream_on_copy_as_csv(GtkWindow *win _U_, gpointer data _U_)
/* Now that we have the CSV data, copy it into the default clipboard */
cb = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
- gtk_clipboard_set_text(cb, CSV_str->str, CSV_str->len);
+ gtk_clipboard_set_text(cb, CSV_str->str, (gint) CSV_str->len);
g_string_free(CSV_str, TRUE);
}
diff --git a/gtk/stats_tree_stat.c b/gtk/stats_tree_stat.c
index 577034c91a..c5ce5f26f1 100644
--- a/gtk/stats_tree_stat.c
+++ b/gtk/stats_tree_stat.c
@@ -190,7 +190,7 @@ init_gtk_tree(const char* optarg, void *userdata _U_)
gchar* window_name = NULL;
GString* error_string;
GtkWidget *scr_win;
- guint init_strlen;
+ size_t init_strlen;
GtkWidget *main_vb, *bbox, *bt_close;
GtkTreeViewColumn* column;
GtkCellRenderer* renderer;
diff --git a/gtk/supported_protos_dlg.c b/gtk/supported_protos_dlg.c
index 08395b7539..5ddc36d78b 100644
--- a/gtk/supported_protos_dlg.c
+++ b/gtk/supported_protos_dlg.c
@@ -227,11 +227,11 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
name = proto_get_protocol_name(i);
short_name = proto_get_protocol_short_name(protocol);
filter_name = proto_get_protocol_filter_name(i);
- if ((len = strlen(name)) > namel)
+ if ((len = (int) strlen(name)) > namel)
namel = len;
- if ((len = strlen(short_name)) > short_namel)
+ if ((len = (int) strlen(short_name)) > short_namel)
short_namel = len;
- if ((len = strlen(filter_name)) > filter_namel)
+ if ((len = (int) strlen(filter_name)) > filter_namel)
filter_namel = len;
}
maxlen = namel + short_namel + filter_namel;
@@ -252,7 +252,7 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
-short_namel, short_name,
-namel, name,
-filter_namel, filter_name);
- insert_text(w, buffer, strlen(buffer));
+ insert_text(w, buffer, (int) strlen(buffer));
}
break;
@@ -271,18 +271,18 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
if (hfinfo->same_name_prev != NULL) /* ignore duplicate names */
continue;
- if ((len = strlen(hfinfo->abbrev)) > maxlen)
+ if ((len = (int) strlen(hfinfo->abbrev)) > maxlen)
maxlen = len;
- if ((len = strlen(hfinfo->name)) > maxlen2)
+ if ((len = (int) strlen(hfinfo->name)) > maxlen2)
maxlen2 = len;
if (hfinfo->blurb != NULL) {
- if ((len = strlen(hfinfo->blurb)) > maxlen4)
+ if ((len = (int) strlen(hfinfo->blurb)) > maxlen4)
maxlen4 = len;
}
}
}
- insert_text(w, dfilter_supported, strlen(dfilter_supported));
+ insert_text(w, dfilter_supported, (int) strlen(dfilter_supported));
fcount = 0;
for (i = proto_get_first_protocol(&cookie); i != -1;
@@ -325,7 +325,7 @@ static void set_supported_text(GtkWidget *w, supported_type_t type)
-maxlen2, hfinfo->name,
type_name);
}
- insert_text(w, buffer, strlen(buffer));
+ insert_text(w, buffer, (int) strlen(buffer));
}
}
len = g_snprintf(buffer, BUFF_LEN, "\n-- Total %d fields\n", fcount);
diff --git a/gtk/text_page_utils.c b/gtk/text_page_utils.c
index 2cbc309b9b..b2769cc881 100644
--- a/gtk/text_page_utils.c
+++ b/gtk/text_page_utils.c
@@ -116,7 +116,7 @@ static void text_page_set_text(GtkWidget *page, const char *absolute_path)
text_file = ws_fopen(absolute_path, "r");
if (text_file != NULL) {
while (fgets(line, sizeof line, text_file) != NULL) {
- text_page_insert(page, line, strlen(line));
+ text_page_insert(page, line, (int) strlen(line));
}
if(ferror(text_file)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Error reading file \"%s\": %s",
diff --git a/gtk/u3.c b/gtk/u3.c
index 0ce43acf45..a431c8f38c 100644
--- a/gtk/u3.c
+++ b/gtk/u3.c
@@ -125,7 +125,7 @@ void u3_register_pid()
pid = getpid();
- pf_size = strlen(u3hostexecpath) + 32;
+ pf_size = (int) strlen(u3hostexecpath) + 32;
pid_file = g_malloc(pf_size);
g_snprintf(pid_file, pf_size, "%s\\%d.pid", u3hostexecpath, pid);
diff --git a/gtk/uat_gui.c b/gtk/uat_gui.c
index d8e45d7870..7463b4ad49 100644
--- a/gtk/uat_gui.c
+++ b/gtk/uat_gui.c
@@ -283,12 +283,12 @@ static gboolean uat_dlg_cb(GtkWidget *win _U_, gpointer user_data) {
switch(f[colnum].mode) {
case PT_TXTMOD_STRING:
text = gtk_entry_get_text(GTK_ENTRY(e));
- len = strlen(text);
+ len = (unsigned) strlen(text);
break;
case PT_TXTMOD_HEXBYTES: {
text = gtk_entry_get_text(GTK_ENTRY(e));
- text = (void*) unhexbytes(text, strlen(text), &len, &err);
+ text = (void*) unhexbytes(text, (guint) strlen(text), &len, &err);
if (err) {
err = ep_strdup_printf("error in field '%s': %s",f[colnum].title,err);
@@ -300,7 +300,7 @@ static gboolean uat_dlg_cb(GtkWidget *win _U_, gpointer user_data) {
case PT_TXTMOD_ENUM: {
text = *(char**)e;
text = text ? text : "";
- len = strlen(text);
+ len = (unsigned) strlen(text);
break;
}
default:
diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c
index f065759f68..f5d91bbc97 100644
--- a/gtk/voip_calls_dlg.c
+++ b/gtk/voip_calls_dlg.c
@@ -276,8 +276,8 @@ voip_calls_on_filter (GtkButton *button _U_,
const gchar *filter_prepend;
gboolean isFirst = TRUE;
GList* list;
- guint filter_length = 0;
- guint max_filter_length = 2048;
+ size_t filter_length = 0;
+ size_t max_filter_length = 2048;
sip_calls_info_t *tmp_sipinfo;
isup_calls_info_t *tmp_isupinfo;
h323_calls_info_t *tmp_h323info;