Hi Avri, hi Chris, > > I got a compile error with GCC7. When trimming white spaces from strings > > lsmmc uses strncpy with overlapping memory areas. This is not allowed. > > In addition, the implementation was not efficient with calling strlen > > and strncpy once per iteration. Refactor the code to be valid and more > > effective. > > > > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> > > --- > > lsmmc.c | 16 +++++++++++----- > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > diff --git a/lsmmc.c b/lsmmc.c > > index c4faa00..9737b37 100644 > > --- a/lsmmc.c > > +++ b/lsmmc.c > > @@ -316,8 +316,9 @@ int parse_ids(struct config *config) > > /* MMC/SD file parsing functions */ > > char *read_file(char *name) > > { > > See Uwe's note - https://www.spinics.net/lists/linux-mmc/msg51882.html Thanks for the pointer. Chris, how do you feel with maintaining mmc-utils? Would you maybe be willing to share maintenance with someone? Happy hacking, Wolfram
Attachment:
signature.asc
Description: PGP signature