64-bit compile warning/error fixups
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3134 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -380,13 +380,15 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self,
|
|||||||
|
|
||||||
#define ADD_STRING_VAL(field, name, ucase, unhexify, secret) \
|
#define ADD_STRING_VAL(field, name, ucase, unhexify, secret) \
|
||||||
if (field) { \
|
if (field) { \
|
||||||
|
int len = -1; \
|
||||||
if (ucase) \
|
if (ucase) \
|
||||||
value = g_ascii_strup (field, -1); \
|
value = g_ascii_strup (field, -1); \
|
||||||
else if (unhexify) { \
|
else if (unhexify) { \
|
||||||
value = nm_utils_hexstr2bin (field, strlen (field)); \
|
value = nm_utils_hexstr2bin (field, strlen (field)); \
|
||||||
|
len = strlen (field) / 2; \
|
||||||
} else \
|
} else \
|
||||||
value = g_strdup (field); \
|
value = g_strdup (field); \
|
||||||
success = nm_supplicant_config_add_option (self, name, value, unhexify ? (strlen (field) / 2) : -1, secret); \
|
success = nm_supplicant_config_add_option (self, name, value, len, secret); \
|
||||||
g_free (value); \
|
g_free (value); \
|
||||||
if (!success) { \
|
if (!success) { \
|
||||||
nm_warning ("Error adding %s to supplicant config.", name); \
|
nm_warning ("Error adding %s to supplicant config.", name); \
|
||||||
|
@@ -425,7 +425,7 @@ make_wireless_setting (shvarFile *ifcfg,
|
|||||||
|
|
||||||
if (len > 32 || len == 0) {
|
if (len > 32 || len == 0) {
|
||||||
g_set_error (error, ifcfg_plugin_error_quark (), 0,
|
g_set_error (error, ifcfg_plugin_error_quark (), 0,
|
||||||
"Invalid SSID '%s' (size %d not between 1 and 32 inclusive)",
|
"Invalid SSID '%s' (size %zu not between 1 and 32 inclusive)",
|
||||||
value, len);
|
value, len);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@@ -217,8 +217,8 @@ release_one_connection (gpointer item, gpointer user_data)
|
|||||||
static void
|
static void
|
||||||
free_watch (gpointer key, gpointer value, gpointer user_data)
|
free_watch (gpointer key, gpointer value, gpointer user_data)
|
||||||
{
|
{
|
||||||
int ifd = (int) user_data;
|
int ifd = GPOINTER_TO_INT (user_data);
|
||||||
int wd = (int) value;
|
int wd = GPOINTER_TO_INT (value);
|
||||||
|
|
||||||
if (inotify_rm_watch (ifd, wd) != 0)
|
if (inotify_rm_watch (ifd, wd) != 0)
|
||||||
PLUGIN_WARN (PLUGIN_NAME, "error removing inotify watch on %s", (char *) key);
|
PLUGIN_WARN (PLUGIN_NAME, "error removing inotify watch on %s", (char *) key);
|
||||||
|
Reference in New Issue
Block a user