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

 
 

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

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

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Sat 28 Nov 2009 06:57:31 PM UTC
   
 
Priority:  5 - Normal Status:  Done
Privacy:  Public Assigned to:  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>
Group administrator
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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by astyanax (Posted a comment)
  • -email is unavailable- added by dolorous (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-21 bens Open/ClosedOpen Closed
    2009-11-29 astyanax StatusNone Done
        Assigned toNone astyanax
    2009-11-28 dolorous Attached File- Added pedantic4447.patch, #19145

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code