[monkey-bubble: 286/753] Changes to eliminate any potential problems on 64-bit platforms.
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 286/753] Changes to eliminate any potential problems on 64-bit platforms.
- Date: Wed, 14 Jul 2010 22:19:41 +0000 (UTC)
commit 430ac09bc92a437bb6905ce36543d8f01da11944
Author: Mark Murnane <Mark Murnane ireland sun com>
Date: Fri May 18 19:33:52 2001 +0000
Changes to eliminate any potential problems on 64-bit platforms.
2001-05-16 Mark Murnane <Mark Murnane ireland sun com>
* Changes to eliminate any potential problems on 64-bit platforms.
* gnome-config.c (gnome_config_assemble_vector): Modified type
of len to match return type of strlen().
* gnome-ditem.c (replace_percentsign): Modified type of start,
string_len and ps_len as they are used in strlen() operations.
(strip_the_amp): Ditto for exec_len.
(stripstreq): Ditto for len2.
* gnome-exec.c (gnome_execute_async_with_env_fds): Modiifed type
of res to gssize to match return type of read() and write() system
calls.
* gnome-moz-remote.c (mozilla_remote_test_window): Cast
hostname to const char* to match g_strcasecmp's signature.
* gnome-paper.c (paper_name_compare): Modified return type
from int to long to match return type of g_strcasecmp.
(unit_name_compare): Ditto
(unit_abbrev_compare): Ditto
* gnome-program.c (gnome_program_install_property): Cast
parameter #3 of both calls to g_param_spec_set_qdata.
* gnome-score.c (log_score): Modified type of counter i to
match return from strlen().
* gnome-selector.c (_gnome_selector_add_history): Cast
parameter #3 to GCompareFunc.
libgnome/ChangeLog | 33 +++++++++++++++++++++++++++++++++
libgnome/gnome-config.c | 3 ++-
libgnome/gnome-ditem.c | 6 +++---
libgnome/gnome-exec.c | 2 +-
libgnome/gnome-moz-remote.c | 2 +-
libgnome/gnome-paper.c | 6 +++---
libgnome/gnome-program.c | 4 ++--
libgnome/test-libgnome.c | 3 ++-
8 files changed, 47 insertions(+), 12 deletions(-)
---
diff --git a/libgnome/ChangeLog b/libgnome/ChangeLog
index 3ed3767..e97c98e 100644
--- a/libgnome/ChangeLog
+++ b/libgnome/ChangeLog
@@ -1,3 +1,36 @@
+2001-05-16 Mark Murnane <Mark Murnane ireland sun com>
+
+ * Changes to eliminate any potential problems on 64-bit platforms.
+
+ * gnome-config.c (gnome_config_assemble_vector): Modified type
+ of len to match return type of strlen().
+
+ * gnome-ditem.c (replace_percentsign): Modified type of start,
+ string_len and ps_len as they are used in strlen() operations.
+ (strip_the_amp): Ditto for exec_len.
+ (stripstreq): Ditto for len2.
+
+ * gnome-exec.c (gnome_execute_async_with_env_fds): Modiifed type
+ of res to gssize to match return type of read() and write() system
+ calls.
+
+ * gnome-moz-remote.c (mozilla_remote_test_window): Cast
+ hostname to const char* to match g_strcasecmp's signature.
+
+ * gnome-paper.c (paper_name_compare): Modified return type
+ from int to long to match return type of g_strcasecmp.
+ (unit_name_compare): Ditto
+ (unit_abbrev_compare): Ditto
+
+ * gnome-program.c (gnome_program_install_property): Cast
+ parameter #3 of both calls to g_param_spec_set_qdata.
+
+ * gnome-score.c (log_score): Modified type of counter i to
+ match return from strlen().
+
+ * gnome-selector.c (_gnome_selector_add_history): Cast
+ parameter #3 to GCompareFunc.
+
2001-05-15 Martin Baulig <baulig suse de>
* libgnome-init.c (gnome_vfs_pre_args_parse): Call gnome_vfs_init()
diff --git a/libgnome/gnome-config.c b/libgnome/gnome-config.c
index 8ea14b5..d2845fb 100644
--- a/libgnome/gnome-config.c
+++ b/libgnome/gnome-config.c
@@ -1956,7 +1956,8 @@ gnome_config_assemble_vector (int argc, const char *const argv [])
{
char *value, *p;
const char *s;
- int i, len;
+ int i;
+ size_t len;
/*
* Compute length of quoted string. We cheat and just use
diff --git a/libgnome/gnome-ditem.c b/libgnome/gnome-ditem.c
index 24e7fed..39f71b5 100644
--- a/libgnome/gnome-ditem.c
+++ b/libgnome/gnome-ditem.c
@@ -866,7 +866,7 @@ replace_percentsign(int argc, char **argv, const char *ps,
char *arg = argv[i];
char *p = strstr(arg,ps);
char *s;
- int start, string_len, ps_len;
+ size_t start, string_len, ps_len;
if(!p) continue;
string_len = strlen(string);
ps_len = strlen(ps);
@@ -980,7 +980,7 @@ ditem_execute(const GnomeDesktopItem *item, int appargc, const char *appargv[],
static gboolean
strip_the_amp(char *exec)
{
- int exec_len;
+ size_t exec_len;
g_strstrip(exec);
if(!*exec) return FALSE;
@@ -1134,7 +1134,7 @@ perc_replaced:
static gboolean
stripstreq(const char *s1, const char *s2)
{
- int len2;
+ size_t len2;
/* skip over initial spaces */
while(*s1 == ' ' || *s1 == '\t')
diff --git a/libgnome/gnome-exec.c b/libgnome/gnome-exec.c
index 49e7bb5..4aa3dd5 100644
--- a/libgnome/gnome-exec.c
+++ b/libgnome/gnome-exec.c
@@ -74,7 +74,7 @@ gnome_execute_async_with_env_fds (const char *dir, int argc,
{
int parent_comm_pipes[2], child_comm_pipes[2];
int child_errno, itmp, i, open_max;
- int res;
+ gssize res;
char **cpargv;
pid_t child_pid, immediate_child_pid; /* XXX this routine assumes
pid_t is signed */
diff --git a/libgnome/gnome-moz-remote.c b/libgnome/gnome-moz-remote.c
index 2d146f3..1ce8c23 100644
--- a/libgnome/gnome-moz-remote.c
+++ b/libgnome/gnome-moz-remote.c
@@ -198,7 +198,7 @@ mozilla_remote_test_window(Display *dpy, Window win, Bool isLocal)
if (hostname) XFree(hostname);
return False;
}
- if (! g_strcasecmp(hostname, localhostname)) {
+ if (! g_strcasecmp((const char*)hostname, localhostname)) {
XFree(hostname);
return True;
}
diff --git a/libgnome/gnome-paper.c b/libgnome/gnome-paper.c
index 5439a38..c07f085 100644
--- a/libgnome/gnome-paper.c
+++ b/libgnome/gnome-paper.c
@@ -109,19 +109,19 @@ paper_init (void)
}
}
-static int
+static long
paper_name_compare (const GnomePaper* a, const gchar *b)
{
return (g_strcasecmp(a->name, b));
}
-static int
+static long
unit_name_compare (const GnomeUnit* a, const gchar *b)
{
return (g_strcasecmp(a->name, b));
}
-static int
+static long
unit_abbrev_compare (const GnomeUnit *a, const gchar *b)
{
return (g_strcasecmp(a->unit, b));
diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c
index 2dfb8c2..41cb535 100644
--- a/libgnome/gnome-program.c
+++ b/libgnome/gnome-program.c
@@ -645,8 +645,8 @@ gnome_program_install_property (GnomeProgramClass *pclass,
g_return_val_if_fail (GNOME_IS_PROGRAM_CLASS (pclass), -1);
g_return_val_if_fail (pspec != NULL, -1);
- g_param_spec_set_qdata (pspec, quark_get_prop, get_fn);
- g_param_spec_set_qdata (pspec, quark_set_prop, set_fn);
+ g_param_spec_set_qdata (pspec, quark_get_prop, (gpointer)get_fn);
+ g_param_spec_set_qdata (pspec, quark_set_prop, (gpointer)set_fn);
g_object_class_install_property (G_OBJECT_CLASS (pclass),
last_property_id, pspec);
diff --git a/libgnome/test-libgnome.c b/libgnome/test-libgnome.c
index 3db117b..42a3a7f 100644
--- a/libgnome/test-libgnome.c
+++ b/libgnome/test-libgnome.c
@@ -180,7 +180,8 @@ main (int argc, char **argv)
g_message (G_STRLOC ": %d - `%s' - `%s' - `%s' - `%s'", foo, app_prefix,
app_id, app_version, human_readable_name);
- g_message (G_STRLOC ": GNOME_PATH == `%s'", gnome_path);
+ if (gnome_path)
+ g_message (G_STRLOC ": GNOME_PATH == `%s'", gnome_path);
test_file_locate (program);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]