Bug 144598

Summary: imap-2004g_suse-4: dodgy code
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Michael Skibbe <mskibbe>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None CC: behlert
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-01-21 12:42:40 UTC
I just tried to compile package imap-2004g_suse-4 with the Intel C compiler.

It said

1.

env_unix.c(1206): warning #187: use of "=" where "==" may have been intended

The source code is

          (read (fd,tmp,i) == i) && !(tmp[i] = 0) && ((i = atol (tmp)) > 0))

I agree with the compiler. Suggest new code

          (read (fd,tmp,i) == i) && !(tmp[i] == 0) && ((i = atol (tmp)) > 0))

2.

imap4r1.c(1814): warning #187: use of "=" where "==" may have been intended

The source code is

          (aflg.text = "-FLAGS \\Seen")) ||

I agree with the compiler. May new code

          (aflg.text == "-FLAGS \\Seen")) ||

or maybe 

          (strcmp( aflg.text, "-FLAGS \\Seen") == 0)) ||

would be better

3.

imap4r1.c(1816): warning #187: use of "=" where "==" may have been intended

Duplicate.

4.

nntp.c(848): warning #187: use of "=" where "==" may have been intended

The source code is

      if ((elt = mail_elt (stream,i))->sequence && (elt->valid = T) &&

I agree with the compiler. Suggest new code

      if ((elt = mail_elt (stream,i))->sequence && (elt->valid == T) &&
Comment 1 Forgotten User ZhJd0F0L3x 2006-01-21 13:11:00 UTC
Thanks for the report. I'll have a look at this.

(Now i know why everybody hates the UW IMAP code... ;-)
Comment 5 Hendrik Vogelsang 2006-11-10 11:37:04 UTC
re-assign to new maintainer.
Comment 6 Michael Skibbe 2006-11-14 09:27:02 UTC
i think this is fixed in the new version of imap. i update asap.
Comment 7 Michael Skibbe 2006-11-16 10:12:57 UTC
i submit the new version into stable => fixed