commit 1fdf793a3fb9f4704977ef49e0a490a83291ea4d
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Wed Mar 29 15:14:56 2017 +0200

    fix signedness of 'nex' variables
    
    they are derived from srec->status, which is unsigned. for not
    understood reasons, the compiler complains only after extending status
    to a full unsigned int.
    
    on the way, localize the declarations.

 src/sync.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sync.c b/src/sync.c
index 3f30d94..c5bcaf7 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1374,7 +1374,7 @@ box_loaded( int sts, void *aux )
        message_t *tmsg;
        flag_vars_t *fv;
        int uid, no[2], del[2], alive, todel, t1, t2;
-       int sflags, nflags, aflags, dflags, nex;
+       int sflags, nflags, aflags, dflags;
        uint hashsz, idx;
        char fbuf[16]; /* enlarge when support for keywords is added */
 
@@ -1709,7 +1709,7 @@ box_loaded( int sts, void *aux )
                        if (!srec->tuid[0]) {
                                if (!srec->msg[S])
                                        continue;
-                               nex = (srec->status / S_NEXPIRE) & 1;
+                               uint nex = (srec->status / S_NEXPIRE) & 1;
                                if (nex != ((srec->status / S_EXPIRED) & 1)) {
                                        /* The record needs a state change ... 
*/
                                        if (nex != ((srec->status / S_EXPIRE) & 
1)) {
@@ -1986,7 +1986,7 @@ flags_set_p2( sync_vars_t *svars, sync_rec_t *srec, int t 
)
                        Fprintf( svars->jfp, "* %d %d %u\n", srec->uid[M], 
srec->uid[S], nflags );
                }
                if (t == S) {
-                       int nex = (srec->status / S_NEXPIRE) & 1;
+                       uint nex = (srec->status / S_NEXPIRE) & 1;
                        if (nex != ((srec->status / S_EXPIRED) & 1)) {
                                if (nex && (svars->smaxxuid < srec->uid[S]))
                                        svars->smaxxuid = srec->uid[S];

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to