Commit 44bb089a authored by Brian Cameron's avatar Brian Cameron Committed by Brian Cameron

: Fix warnings and fix an assertion in gdm because it called

2007-01-31  Brian Cameron  <brian.cameron@sun.com>

        * gui/greeter/greeter_item_customlist.c,
          gui/greeter/greeter_canvas_item.c,
          gui/greeter/greeter_canvas_text.c,
          gui/greeter/greeter_session.c,
          gui/gdmXnestchooser.c, gui/gdmchooser.c,
          gui/gdmconfig.[ch], daemon/xdmcp.c,
          daemon/verify-pam.c, daemon/server.c,
          daemon/gdmconfig.c, daemon/errorgui.c,
          daemon/misc.c: :  Fix warnings and fix an
          assertion in gdm because it called
          gdm_xdmcp_send_forward_query also for IPv6.
          Patch by Ludwig Nussel.

svn path=/trunk/; revision=4558
parent 399cc33d
2007-01-31 Brian Cameron <brian.cameron@sun.com>
* gui/greeter/greeter_item_customlist.c,
gui/greeter/greeter_canvas_item.c,
gui/greeter/greeter_canvas_text.c,
gui/greeter/greeter_session.c,
gui/gdmXnestchooser.c, gui/gdmchooser.c,
gui/gdmconfig.[ch], daemon/xdmcp.c,
daemon/verify-pam.c, daemon/server.c,
daemon/gdmconfig.c, daemon/errorgui.c,
daemon/misc.c: : Fix warnings and fix an
assertion in gdm because it called
gdm_xdmcp_send_forward_query also for IPv6.
Patch by Ludwig Nussel.
:
2006-01-26 Brian Cameron <brian.cameron@sun.com>
* gui/gdmsetup.d, daemon/slave.c: Fix some trivial spelling
......
......@@ -317,12 +317,10 @@ gdm_error_box_full (GdmDisplay *d, GtkMessageType type, const char *error,
if (details_label != NULL) {
if (strncmp (details_label, "NIL", 3) == 0)
g_free (details_label);
details_label = NULL;
}
if (details_file != NULL) {
if (strncmp (details_file, "NIL", 3) == 0)
g_free (details_file);
details_file = NULL;
}
......
......@@ -655,7 +655,7 @@ gdm_get_custom_config (struct stat *statbuf)
* appended, and never gdm.conf.
*/
static gchar *
gdm_get_per_display_custom_config_file (gchar *display)
gdm_get_per_display_custom_config_file (const gchar *display)
{
return g_strdup_printf ("%s%s", custom_config_file, display);
}
......@@ -818,7 +818,7 @@ gboolean gdm_get_value_bool_per_display (gchar *display, gchar *key)
* value if none exists. Note that this value needs to be freed,
* unlike the non-per-display version.
*/
gchar * gdm_get_value_string_per_display (gchar *display, gchar *key)
gchar * gdm_get_value_string_per_display (const gchar *display, gchar *key)
{
gchar *perdispval;
......@@ -844,7 +844,7 @@ gchar * gdm_get_value_string_per_display (gchar *display, gchar *key)
* sure they are added to the if-test below.
*/
void
gdm_config_key_to_string_per_display (gchar *display, gchar *key, gchar **retval)
gdm_config_key_to_string_per_display (const gchar *display, gchar *key, gchar **retval)
{
gchar *file;
gchar **splitstr = g_strsplit (key, "/", 2);
......
......@@ -29,7 +29,7 @@ gchar* gdm_get_custom_config_file (void);
gchar* gdm_get_value_string (gchar *key);
gboolean gdm_get_value_bool (gchar *key);
gint gdm_get_value_int (gchar *key);
gchar* gdm_get_value_string_per_display (gchar *display,
gchar* gdm_get_value_string_per_display (const gchar *display,
gchar *key);
gboolean gdm_get_value_bool_per_display (gchar *display,
gchar *key);
......@@ -42,7 +42,7 @@ void gdm_set_value_bool (gchar *key,
void gdm_set_value_int (gchar *key,
gint value);
void gdm_config_key_to_string_per_display
(gchar *file,
(const gchar *display,
gchar *key,
gchar **retval);
void gdm_config_key_to_string (gchar *file,
......
......@@ -2214,7 +2214,7 @@ gdm_reset_locale (void)
else if CHECK_LC("LC_MONETARY", LC_MONETARY)
else if CHECK_LC("LC_NUMERIC", LC_NUMERIC)
else if CHECK_LC("LC_TIME", LC_TIME)
else if CHECK_LC("LANG", NULL)
else if CHECK_LC("LANG", 0)
g_string_set_size (line, 0);
}
......@@ -2227,7 +2227,7 @@ gdm_reset_locale (void)
g_free (i18n_file_contents);
}
#undef CHECK_LC(value, category)
#undef CHECK_LC
#else /* ! NUM_OF_LIMITS */
/* We have to go one by one here */
......
......@@ -1395,7 +1395,7 @@ gdm_server_alloc (gint id, const gchar *command)
hostname[1023] = '\0';
if (gethostname (hostname, 1023) == -1)
strcmp (hostname, "localhost.localdomain");
strcpy (hostname, "localhost.localdomain");
d = g_new0 (GdmDisplay, 1);
......
......@@ -471,14 +471,14 @@ perhaps_translate_message (const char *msg)
/* Internal PAM conversation function. Interfaces between the PAM
* authentication system and the actual greeter program */
static gint
static int
gdm_verify_pam_conv (int num_msg, struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr)
{
int replies = 0;
int i;
char *s;
char *s = NULL;
struct pam_response *reply = NULL;
const void *p;
const char *login;
......@@ -640,7 +640,7 @@ static struct pam_conv pamc = {
/* Extra message to give on queries */
static char *extra_standalone_message = NULL;
static gint
static int
gdm_verify_standalone_pam_conv (int num_msg, struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr)
......@@ -884,7 +884,7 @@ authenticate_again:
* PAM Stacks, in case one display should use a different
* authentication mechanism than another display.
*/
pam_stack = gdm_get_value_string_per_display (display, GDM_KEY_PAM_STACK);
pam_stack = gdm_get_value_string_per_display ((char *)display, GDM_KEY_PAM_STACK);
if ( ! create_pamh (d, pam_stack, login, &pamc, display, &pamerr)) {
if (started_timer)
......@@ -1261,7 +1261,7 @@ gdm_verify_setup_user (GdmDisplay *d, const gchar *login, const gchar *display,
* PAM Stacks, in case one display should use a different
* authentication mechanism than another display.
*/
pam_stack = gdm_get_value_string_per_display (display, GDM_KEY_PAM_STACK);
pam_stack = gdm_get_value_string_per_display ((char *)display, GDM_KEY_PAM_STACK);
pam_service_name = g_strdup_printf ("%s-autologin", pam_stack);
if ( ! create_pamh (d, pam_service_name, login, &standalone_pamc,
......
This diff is collapsed.
......@@ -168,7 +168,7 @@ static const GOptionEntry xnest_only_options[] = {
{ "xnest", 'x', 0, G_OPTION_ARG_STRING, &xnest_binary, N_("Xnest command line"), N_("STRING") },
{ "xnest-extra-options", 'o', 0, G_OPTION_ARG_STRING, &xnest_options, N_("Extra options for Xnest"), N_("OPTIONS") },
{ "background", 'b', 0, G_OPTION_ARG_NONE, &background, N_("Run in background"), NULL },
{ G_OPTION_REMAINING, NULL, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL },
{ NULL }
};
......@@ -180,7 +180,7 @@ static const GOptionEntry options[] = {
{ "broadcast", 'B', 0, G_OPTION_ARG_NONE, &do_broadcast, N_("Run broadcast instead of indirect (chooser)"), NULL },
{ "background", 'b', 0, G_OPTION_ARG_NONE, &background, N_("Run in background"), NULL },
{ "no-gdm-check", '\0', 0, G_OPTION_ARG_NONE, &no_gdm_check, N_("Don't check for running GDM"), NULL },
{ G_OPTION_REMAINING, NULL, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL },
{ NULL }
};
......
......@@ -84,6 +84,7 @@ struct _GdmChooserHost {
static const gchar *scanning_message = N_("Please wait: scanning local network...");
static const gchar *empty_network = N_("No serving hosts were found.");
static const gchar *active_network = N_("Choose a ho_st to connect to:");
static void gdm_chooser_cancel (/*void*/);
/* XDM chooser style stuff */
static gchar *xdm_address = NULL;
......@@ -91,7 +92,6 @@ static gchar *client_address = NULL;
static gint connection_type = 0;
/* Exported for glade */
void gdm_chooser_cancel (/*void*/);
void gdm_chooser_add_host (void);
void gdm_chooser_add_entry_changed (void);
void gdm_chooser_manage (GtkButton *button, gpointer data);
......@@ -1535,8 +1535,8 @@ gdm_chooser_add_entry_changed (void)
gtk_widget_set_sensitive (add_button, ! ve_string_empty (name));
}
void
gdm_chooser_cancel (/*void*/)
static void
gdm_chooser_cancel (int sig)
{
if (scan_time_handler > 0) {
g_source_remove (scan_time_handler);
......@@ -1907,7 +1907,7 @@ GOptionEntry chooser_options [] = {
N_("Client address to return in response to xdm"), N_("ADDRESS") },
{ "connectionType", '\0', 0, G_OPTION_ARG_INT, &connection_type,
N_("Connection type to return in response to xdm"), N_("TYPE") },
{ G_OPTION_REMAINING, NULL, 0, G_OPTION_ARG_STRING_ARRAY, &chooser_hosts,
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &chooser_hosts,
NULL, NULL },
{ NULL }
};
......
......@@ -618,7 +618,6 @@ gdm_config_get_bool (gchar *key)
/**
* gdm_config_reload_string
* gdm_config_reload_translated_string
* gdm_config_reload_int
* gdm_config_reload_bool
*
......@@ -633,14 +632,6 @@ gdm_config_reload_string (gchar *key)
return changed;
}
static gboolean
gdm_config_reload_translated_string (gchar *key)
{
gboolean changed;
_gdm_config_get_translated_string (key, TRUE, &changed);
return changed;
}
gboolean
gdm_config_reload_int (gchar *key)
{
......
......@@ -132,7 +132,7 @@ activate_button (GtkWidget *widget, gpointer data)
greeter_item_run_action_callback (id);
}
void
static void
menubar_done (GtkMenuShell *menushell, gpointer data)
{
GreeterItemInfo *entry_info = greeter_lookup_id ("user-pw-entry");
......
......@@ -95,7 +95,7 @@ greeter_canvas_text_get_screen_dpi (GreeterCanvasText *text)
0, G_MAXINT,
FALSE,
&type, NULL, &resources_length,
(guchar **) &resources))
(void *) &resources))
{
gdk_error_trap_pop ();
return default_dpi;
......
......@@ -347,7 +347,7 @@ populate_language (GObject *object)
}
/* Callback helper function to set session value */
void
static void
combo_session_selected (char *session_val)
{
GList *tmp;
......
......@@ -36,6 +36,7 @@
#include "greeter.h"
#include "greeter_session.h"
#include "greeter_item_pam.h"
#include "greeter_item_customlist.h"
#include "greeter_configuration.h"
#include "greeter_events.h"
#include "greeter_parser.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment