Ticket #180: 0001-Reduce-warning-storm-in-libavahi-ui.patch

File 0001-Reduce-warning-storm-in-libavahi-ui.patch, 6.6 kB (added by MathiasHasselmann, 1 year ago)
  • a/avahi-ui/Makefile.am

    old new  
    1717# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 
    1818# USA. 
    1919 
    20 AM_CFLAGS=-I$(top_srcdir) 
     20AM_CFLAGS=-I$(top_srcdir) -DG_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -DGTK_DISABLE_DEPRECATED=1 
    2121 
    2222# This cool debug trap works on i386/gcc only 
    2323AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' 
  • a/avahi-ui/avahi-ui.c

    old new  
    244244 
    245245 
    246246GtkWidget *aui_service_dialog_new_valist( 
    247         gchar *title, 
     247        const gchar *title, 
    248248        GtkWindow *parent, 
    249249        const gchar *first_button_text, 
    250250        va_list varargs) { 
     
    291291     
    292292    va_list varargs; 
    293293    va_start(varargs, first_button_text); 
    294     w = aui_service_dialog_new_valist((gchar*) title, parent, first_button_text, varargs); 
     294    w = aui_service_dialog_new_valist(title, parent, first_button_text, varargs); 
    295295    va_end(varargs); 
    296296     
    297297    return w; 
     
    329329} 
    330330 
    331331static void resolve_callback( 
    332         AvahiServiceResolver *r
    333         AvahiIfIndex interface
    334         AvahiProtocol protocol
     332        AvahiServiceResolver *r G_GNUC_UNUSED
     333        AvahiIfIndex interface G_GNUC_UNUSED
     334        AvahiProtocol protocol G_GNUC_UNUSED
    335335        AvahiResolverEvent event, 
    336336        const char *name, 
    337337        const char *type, 
     
    340340        const AvahiAddress *a, 
    341341        uint16_t port, 
    342342        AvahiStringList *txt, 
    343         AvahiLookupResultFlags flags
     343        AvahiLookupResultFlags flags G_GNUC_UNUSED
    344344        void *userdata) { 
    345345 
    346346    AuiServiceDialog *d = AUI_SERVICE_DIALOG(userdata); 
     
    394394 
    395395 
    396396static void browse_callback( 
    397         AvahiServiceBrowser *b
     397        AvahiServiceBrowser *b G_GNUC_UNUSED
    398398        AvahiIfIndex interface, 
    399399        AvahiProtocol protocol, 
    400400        AvahiBrowserEvent event, 
     
    548548} 
    549549 
    550550static void domain_browse_callback( 
    551         AvahiDomainBrowser *b
    552         AvahiIfIndex interface
    553         AvahiProtocol protocol
     551        AvahiDomainBrowser *b G_GNUC_UNUSED
     552        AvahiIfIndex interface G_GNUC_UNUSED
     553        AvahiProtocol protocol G_GNUC_UNUSED
    554554        AvahiBrowserEvent event, 
    555555        const char *name, 
    556556        AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, 
     
    823823    G_OBJECT_CLASS(aui_service_dialog_parent_class)->finalize(object); 
    824824} 
    825825 
    826 static void service_row_activated_callback(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { 
     826static void service_row_activated_callback(GtkTreeView *tree_view G_GNUC_UNUSED, GtkTreePath *path G_GNUC_UNUSED, GtkTreeViewColumn *column G_GNUC_UNUSED, gpointer user_data) { 
    827827    AuiServiceDialog *d = AUI_SERVICE_DIALOG(user_data); 
    828828 
    829829    gtk_dialog_response(GTK_DIALOG(d), get_default_response(GTK_DIALOG(d))); 
     
    910910    return !!label[0]; 
    911911} 
    912912 
    913 static void domain_row_activated_callback(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { 
     913static void domain_row_activated_callback(GtkTreeView *tree_view G_GNUC_UNUSED, GtkTreePath *path G_GNUC_UNUSED, GtkTreeViewColumn *column G_GNUC_UNUSED, gpointer user_data) { 
    914914    AuiServiceDialog *d = AUI_SERVICE_DIALOG(user_data); 
    915915 
    916916    if (is_valid_domain_suffix(gtk_entry_get_text(GTK_ENTRY(d->priv->domain_entry)))) 
    917917        gtk_dialog_response(GTK_DIALOG(d->priv->domain_dialog), GTK_RESPONSE_ACCEPT); 
    918918} 
    919919 
    920 static void domain_selection_changed_callback(GtkTreeSelection *selection, gpointer user_data) { 
     920static void domain_selection_changed_callback(GtkTreeSelection *selection G_GNUC_UNUSED, gpointer user_data) { 
    921921    GtkTreeIter iter; 
    922922    AuiServiceDialog *d = AUI_SERVICE_DIALOG(user_data); 
    923923    gchar *name; 
     
    930930    gtk_entry_set_text(GTK_ENTRY(d->priv->domain_entry), name); 
    931931} 
    932932 
    933 static void domain_entry_changed_callback(GtkEditable *editable, gpointer user_data) { 
     933static void domain_entry_changed_callback(GtkEditable *editable G_GNUC_UNUSED, gpointer user_data) { 
    934934    AuiServiceDialog *d = AUI_SERVICE_DIALOG(user_data); 
    935935 
    936936    gtk_widget_set_sensitive(d->priv->domain_ok_button, is_valid_domain_suffix(gtk_entry_get_text(GTK_ENTRY(d->priv->domain_entry)))); 
    937937} 
    938938 
    939 static void domain_button_clicked(GtkButton *button, gpointer user_data) { 
     939static void domain_button_clicked(GtkButton *button G_GNUC_UNUSED, gpointer user_data) { 
    940940    GtkWidget *vbox, *vbox2, *scrolled_window; 
    941941    GtkTreeSelection *selection; 
    942942    GtkCellRenderer *renderer; 
     
    977977    gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); 
    978978    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(p->domain_dialog)->vbox), vbox, TRUE, TRUE, 0); 
    979979 
    980     p->domain_entry = gtk_entry_new_with_max_length(AVAHI_DOMAIN_NAME_MAX); 
     980    p->domain_entry = gtk_entry_new(); 
     981    gtk_entry_set_max_length(GTK_ENTRY(p->domain_entry), AVAHI_DOMAIN_NAME_MAX); 
    981982    gtk_entry_set_text(GTK_ENTRY(p->domain_entry), domain); 
    982983    gtk_entry_set_activates_default(GTK_ENTRY(p->domain_entry), TRUE); 
    983984    g_signal_connect(p->domain_entry, "changed", G_CALLBACK(domain_entry_changed_callback), d); 
  • a/avahi-ui/avahi-ui.h

    old new  
    7979 
    8080/** \cond fulldocs */ 
    8181GtkWidget *aui_service_dialog_new_valist( 
    82         gchar *title, 
     82        const gchar *title, 
    8383        GtkWindow *parent, 
    8484        const gchar *first_button_text, 
    8585        va_list varargs);