This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

newlib-2.5.0 bug report


Hello there,

newlib-2.5.0/newlib/libc/sys/linux/iconv/gconv_trans.c:196]: (warning) Char literal compared with pointer 'newp.fname'. Did you intend to dereference it?

Source code is

              strcpy ((char *) newp->fname, runp->name);
              while(newp->fname != '\0') newp->fname++;

Maybe better code

              strcpy ((char *) newp->fname, runp->name);
              while(*(newp->fname) != '\0') newp->fname++;

Regards

David Binderman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]