Re: Cleanups for evolution/calendar

Kjartan Maraas <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1155743241.29241.6.camel@rivendell>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.