Clean up Win32 size/length casts

This commit is contained in:
2026-05-20 15:22:06 -06:00
parent c7064c18b9
commit 9a0c07a461
4 changed files with 5 additions and 5 deletions

View File

@@ -452,7 +452,7 @@ void
fe_add_chan_list (server *serv, char *chan, char *users, char *topic)
{
chanlistrow *next_row;
int len = strlen (chan) + 1;
size_t len = strlen (chan) + 1;
/* we allocate the struct and channel string in one go */
next_row = g_malloc (sizeof (chanlistrow) + len);

View File

@@ -976,7 +976,7 @@ gtkutil_copy_to_clipboard (GtkWidget *widget, GdkAtom selection,
win = gtk_widget_get_toplevel (GTK_WIDGET (widget));
if (gtk_widget_is_toplevel (win))
{
int len = strlen (str);
gint len = (gint) strlen (str);
if (selection)
{

View File

@@ -2309,7 +2309,7 @@ menu_reorder (GtkMenu *menu, GtkWidget *item, int pos)
if (pos < 0) /* position offset from end/bottom */
{
GList *children = gtk_container_get_children (GTK_CONTAINER (menu));
int length = g_list_length (children);
gint length = (gint) g_list_length (children);
g_list_free (children);
gtk_menu_reorder_child (menu, item, (length + pos) - 1);
@@ -2381,7 +2381,7 @@ menu_add_sub (GtkWidget *menu, menu_entry *me)
if (pos < 0) /* position offset from end/bottom */
{
GList *children = gtk_container_get_children (GTK_CONTAINER (menu));
int length = g_list_length (children);
gint length = (gint) g_list_length (children);
g_list_free (children);
pos = length + pos;

View File

@@ -2180,7 +2180,7 @@ unslash (char *dir)
{
if (dir[0])
{
int len = strlen (dir) - 1;
size_t len = strlen (dir) - 1;
#ifdef WIN32
if (dir[len] == '/' || dir[len] == '\\')
#else