Bug 110742 - possibly broken source code
Summary: possibly broken source code
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: elinks
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-24 12:46 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-09 14:53:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-11-24 12:46:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package elinks-0_4_2-7_1 from Fedora.

The compiler said

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

The source code is

        BIN_SEARCH(unicode_7b, x, N_UNICODE_7B, u, s);

The definition of macro BIN_SEARCH is

#define BIN_SEARCH(table, entry, entries, key, result)
        \
{
        \
        long _s = 0, _e = (entries) - 1;
        \
        while (_s <= _e || !((result) = -1)) {


Suspect this last line I have shown would be better as

        while (_s <= _e || !((result) == -1)) {


Version-Release number of selected component (if applicable):
elinks-0_4_2-7_1 

How reproducible:
Always

Steps to Reproduce:
1. by source code inspection
2.
3.
    

Additional info:

Comment 1 Tim Waugh 2003-12-09 14:53:06 UTC
No, this code looks right.  You are paying too much attention to the
compiler warnings and not enough to the intention of the author of the
code. :-)


Note You need to log in before you can comment on or make changes to this bug.