Hi, I was trying to build latest Cyrus imapd with objectstore enabled, and I 
receive an error during build:
 
imap/mailbox.c: In function 'mailbox_record_cleanup':
imap/mailbox.c:3984:20: error: 'spoolfname' undeclared (first use in this 
function)
             unlink(spoolfname);
 
That's true, the code does not define spoolfname in time:
 
static void mailbox_record_cleanup(struct mailbox *mailbox,
                                   struct index_record *record)
{
#if defined ENABLE_OBJECTSTORE
    if (config_getswitch(IMAPOPT_OBJECT_STORAGE_ENABLED)) {
        /* we always remove the spool file here, because we've archived it */
        if (record->system_flags & FLAG_INTERNAL_ARCHIVED)
            unlink(spoolfname);
        /* if the record is also deleted, we remove the objectstore copy */
        if (record->system_flags & FLAG_INTERNAL_UNLINKED)
            objectstore_delete(mailbox, record);
        return;
    }
#endif
.....
    /* file is still alive - check if there's anything to clean up */
    const char *spoolfname = mailbox_spool_fname(mailbox, record->uid);
......

How can I correct this? Simply move this last line at the function start before 
the define?

Gabriele
 
 
Sonicle S.r.l. : http://www.sonicle.com
Music: http://www.gabrielebulfon.com
eXoplanets : https://gabrielebulfon.bandcamp.com/album/exoplanets
 


------------------------------------------
Cyrus: Info
Permalink: 
https://cyrus.topicbox.com/groups/info/T4550b8e69bf8b273-Md4a361079091b961825648d3
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

Reply via email to