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



Hi,

On Wed, 2006-08-16 at 17:47 +0200, Kjartan Maraas wrote:
> 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?

More so, yes.  I don't really know what the real data type of l->data
is, though.  If it's really a string, it should be casted to (char *) in
the printf().  Otherwise %p is the right thing to do.

Joe




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