Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1698 PIC16: string functions not const-correct

open
nobody
PIC16
5
2013-07-16
2010-11-08
Christopher Head
No

In include/pic16/string.h, all the prototypes are non-const-correct. Things like memcpy, strcpy, strlen, and many others take non-const source parameters in their prototypes. This is in v3.0.0. There was even bug #1568836 about fixing const-correctness in memcpypgm2ram, but that only fixed const correctness in a local variable used in the function, not in the parameter types.

Discussion

  • Why does the pic16 port need it's own string.h anyway? Even if it wants to provide those extra functions like memcpypgm2ram, it should just include our standard string.h for the standard functions in the port-specific string.h.
    That would ease maintenance and fix this bug.

    Philipp

     
  • Maarten Brock
    Maarten Brock
    2011-09-18

    • summary: string functions not const-correct --> PIC16: string functions not const-correct
     
    • Category: --> PIC16