Re: [evolution-patches] Cleanups for evolution/calendar



ons, 16,.08.2006 kl. 11.36 -0400, skrev Joe Shaw:
> Hi,
> 
> On Wed, 2006-08-16 at 16:53 +0200, Kjartan Maraas wrote:
> > Index: gui/alarm-notify/alarm-notify.c
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-notify.c,v
> > retrieving revision 1.55
> > diff -u -p -r1.55 alarm-notify.c
> > --- gui/alarm-notify/alarm-notify.c     21 Apr 2006 19:38:16 -0000      1.55
> > +++ gui/alarm-notify/alarm-notify.c     16 Aug 2006 14:53:15 -0000
> > @@ -170,7 +170,7 @@ list_changed_cb (ESourceList *source_lis
> >         g_hash_table_foreach (priv->uri_client_hash[source_type], (GHFunc) process_removal_in_hash, &prd);
> >  
> >         for (l = prd.removals; l; l = l->next) {
> > -               d (printf("%s:%d (list_changed_cb) - Removing Calendar %s\n", __FILE__, __LINE__, l->data));            
> > +               d (printf("%p:%d (list_changed_cb) - Removing Calendar %s\n", __FILE__, __LINE__, l->data));            
> >                 alarm_notify_remove_calendar (an, source_type, l->data);
> >         }
> >         g_list_free (prd.removals); 
> 
> This doesn't seem right.  __FILE__, IIRC, is a string and you want it to
> be displayed as such.  This will turn the output:
> 
You're right, I changed the wrong format specifier :-) I should have
changed the last %s. Does that look correct to you?

>         foo.c:50 (list_changed_cb) [blah]
> 
> into
> 
>          0x8482842:50 (list_changed_cb) [blah]
>         
> which is definitely not what you want.  What is the error you are
> seeing, exactly?
> 
These are the warnings I see in alarm-notify:

alarm-notify.c: in function 'list_changed_cb'
alarm-notify.c:173: warning: format '%s' expects type 'char *', but argument 4 has type 'gpointer'

Cheers
Kjartan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]