Typos in Abiword 2.1.0

From: Johnny Lee (typo_pl_at_hotmail.com)
Date: Tue Jan 20 2004 - 13:49:28 EST

  • Next message: Dom Lachowicz: "Re: Braille plug-in"

    Found with the typo.pl script from <http://www.cpan.org> against the Abiword
    2.1.0 source code.

    Info on typo.pl can be found at <http://www.geocities.com/typopl/> and

    The perl script doesn't know if code is live or not, I have examined the
    possible typos to make sure that they look like errors.

    Extraneous semicolon after if-statement Body of if-statement is always
    executed since
    if-statement applies only to first block/statement after if.
    abi\src\text\fmt\xp\fv_View_cmd.cpp (line 3408):

    Assignment in if statement. In the first case, since the var is set to zero,
    the body of the if-stmt will never be executed. Opposite is true for the
    second case, it's always run.
    Probably need an extra '='.
    abi\src\wp\ap\beos\ap_BeOSFrame.cpp (line 877):

    abi\src\wp\ap\beos\ap_BeOSFrame.cpp (line 882):

    Assignments in ASSERT-type statements are usually bad.
    Probably need an extra '='.
    abi\src\af\util\beos\ut_Xpm2Bitmap.cpp (line 86):
    abi\src\af\util\qnx\ut_Xpm2Bitmap.cpp (line 113):
    abi\src\af\util\win\ut_Xpm2Bmp.cpp (line 123):

    abi\src\wp\ap\xp\ap_Dialog_Tab.cpp (line 564):
    abi\src\wp\ap\xp\ap_Dialog_Tab.cpp (line 640):

    C-operator precedence rules - bitwise-AND is LOWER than ==
    Need to put parentheses around the bitwise-AND expression
    abi\src\af\xap\win\xap_Win32ColourButton.h (line 65):

    memset API is 'memset(ptr, value, size)'. Using zero for size is useless.
    parameters are probably swapped.
    abi\src\af\util\xp\ut_uuid.cpp (line 630):

    Boolean logic error.
    if you have " if (x != 5 || x != 6)"
    then if x == 5, the "x != 6 " expression will be true. Converse is the same.
    Probably wanted "if ((x != 5) && (x != 6))"
    abi\src\af\xap\win\xap_Win32Dlg_FileOpenSaveAs.cpp (line 663):

    abi\src\wp\ap\xp\ap_Menu_Functions.cpp (line 763):
    abi\src\wp\ap\xp\ap_Toolbar_Functions.cpp (line 369):

    Get a FREE online virus check for your PC here, from McAfee.

    This archive was generated by hypermail 2.1.4 : Tue Jan 20 2004 - 13:50:16 EST