Re: Compile error

Hi Andreas,

thanks a lot for your report!

Am 14.03.22 13:52 schrieb(en) AS via balsa-list:
        mailbox_imap.c: In function ‘libbalsa_mailbox_imap_fetch_headers’:
        mailbox_imap.c:2333:15: error: comparison of integer expressions of different signedness: ‘glong’ 
{aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare]
         2333 |     if (msgno > imap_mbox_handle_get_exists(mimap->handle))
                        |               ^
        cc1: all warnings being treated as errors

Yes, that's a bug in the code!  Which probably slipped through with older compilers than on Debian unstable…

I'm not really familiar with the IMAP code, but I *think* the trivial solution would be to declare msgno as 
unsigned in line 2328, and to add a cast to unsigned in line 2330, as all the imap_* functions use unsigned 
as parameters.  Peter?


Attachment: pgp_Yl3ov1_qi.pgp
Description: PGP signature

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