bugGNU gettext - Bugs: bug #21658, patch to avoid shadowing 'index'...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #21658: patch to avoid shadowing 'index' variable

Submitted by:  Wim Lewis <wiml>
Submitted on:  Wed 28 Nov 2007 12:09:56 AM UTC  
 
Category: BuildSeverity: 3 - Normal
Item Group: NoneStatus: Not a Bug
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

Wed 28 Nov 2007 01:23:07 PM UTC, comment #1:

'index' is a perfectly valid name for a local variable.

gcc's "shadowing a global" warning may be useful for your own
code, to catch mistakes. It is not useful when applied to code
written by Ulrich Drepper; such code does not have bugs that
are detectable by superficial inspection.

The global function 'index' is on its way out: it is marked as
LEGACY in POSIX:2001, see
http://www.opengroup.org/onlinepubs/009695399/functions/index.html

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Wed 28 Nov 2007 12:09:56 AM UTC, original submission:

My compiler warns about the local variable shadowing a global; here's a trivial patch to rename the 'index' variable in plural_lookup() to a more specific name.

Wim Lewis <wiml>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by wiml (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Nov 2016 11:51:29 PM UTChaibleCategoryNone=>Build
    Thu 06 Mar 2008 01:57:58 AM UTChaibleStatusWont Fix=>Not a Bug
    Wed 28 Nov 2007 01:23:07 PM UTChaibleStatusNone=>Wont Fix
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed
    Wed 28 Nov 2007 12:09:56 AM UTCwimlAttached File-=>Added variant-index.patch, #14496

    Back to the top


    Powered by Savane 3.1-cleanup1