Page 1 of 1

XCB compiler warning - which line of C code is the issue?

Posted: Fri Aug 19, 2016 1:03 pm
by Jay Dee
Hi, real noob question...
When compiling my FC with XCB I get a warning, I would like to just check its not going to be an issue. Program seems fine but I guess its good practice to check these things.
FC7_Reciever_Gen2_V1-18.c: 2742: (764) mismatched comparison (warning)
So I open the associated .C file and for the example above, do I need to find the line 2742 or 764 ?
Neither line seems obviously wrong to me?
Line764.PNG
Line 764
(14.35 KiB) Downloaded 2439 times
Line2742.PNG
Line 2742
(24.85 KiB) Downloaded 2439 times
Am I looking in the wrong place?
J.

Re: XCB compiler warning - which line of C code is the issue

Posted: Fri Aug 19, 2016 1:26 pm
by medelec35
Hi J.
Its the 1st set on numbers i.e in your case will be the 2742

Martin

Re: XCB compiler warning - which line of C code is the issue

Posted: Fri Aug 19, 2016 2:31 pm
by LeighM
Also, you might get a more accurate view of the correct C code line if you use the inbuilt viewer, menu Build->View C
(due to CR/LF v LF miscounting)

Re: XCB compiler warning - which line of C code is the issue

Posted: Fri Aug 19, 2016 3:47 pm
by Jay Dee
Ah... thanks Martin and Leigh.
And Yes Leigh... it did move me down a few lines.

The warning seems to have been raised by a line in the Matrix I2C LDC scroll code
(FCD_0c591_lcd_I2C1__ScrollDisplay)
Line2742_2.PNG
Line 2742 ver2
(11.79 KiB) Downloaded 2426 times
Anyone see anything amiss ?

Re: XCB compiler warning - which line of C code is the issue

Posted: Fri Aug 19, 2016 3:58 pm
by LeighM
I think that & should be &&
typo, doh!