patchGNU nano - Patches: patch #7004, SVN r4447: Fix several...

 
 

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

patch #7004: SVN r4447: Fix several warnings/issues with -pedantic

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Sat 28 Nov 2009 06:57:31 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Chris Allegretta <astyanax>Open/Closed: Closed
Release: None

Sun 29 Nov 2009 06:15:22 AM UTC, comment #1:

Thanks David, I put this in with r4448.

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Sat 28 Nov 2009 06:57:31 PM UTC, original submission:

The attached patch fixes a few issues that show up with -pedantic[0]:

1. Several "char " parameters that always take constant strings are made "const char ".

2. The global string declarations in proto.h are marked as extern, since they're only actually defined in global.c.

3. A few casts are added for the sake of paranoia.

[0] Technically, these only show up when using g++ as the compiler, along with -g3 -Wall -pedantic. I know this is dubious, but g++ warns about a few important things that gcc doesn't, such as the unused variables in tiny mode fixed by patch #7002, and the "char "/"const char " distinction. And constifying "char *" parameters may not fix any warnings under gcc, but they will make the binary smaller.

David Lawrence Ramsey <dolorous>
Project Administrator

 

Attached Files
file #19145:  pedantic4447.patch added by dolorous (7kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Updated the item)
  • -unavailable- added by astyanax (Posted a comment)
  • -unavailable- added by dolorous (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 21 Feb 2014 02:54:37 PM UTCbensOpen/ClosedOpen=>Closed
    Sun 29 Nov 2009 06:15:22 AM UTCastyanaxStatusNone=>Done
      Assigned toNone=>astyanax
    Sat 28 Nov 2009 06:57:31 PM UTCdolorousAttached File-=>Added pedantic4447.patch, #19145

    Back to the top


    Powered by Savane 3.1-cleanup