Menu

questions about code

2013-07-22
2013-07-24
  • Carlos Montiers

    Carlos Montiers - 2013-07-22

    Hello. Very thanks so much for this library.
    I learning a lot reading the code. And I want use this library for a project.

    I have a question?
    in bsafe.c what are redundant assignments like this?:

    char * strcat (char dst, const char src) {
    dst = dst;
    src = src;

    I'm curious about it. For me it are unnecesary, for sure it have a purpose.

    Also I found some evaluations repited in bstrlib.c:

    line 1783, 1784, 1831, 1832, 1869, 1870:
    repited expression: b->mlen <= 0

    Also, this project have a repository for get the last version in development?.

    Carlos.

     

    Last edit: Carlos Montiers 2013-07-22
  • Paul Hsieh

    Paul Hsieh - 2013-07-24

    These are to shut up the compiler warnings that parameters are not being used. In Visual C++ there is a way to do this by omitting the parameter name in the implementation arguments, but gcc doesn't like this. So the method used, is the one that works on all compilers without issue.

    The Better String Library is basically stable at this point, so there have been no updates to it for a while. The latest code you see here, is in fact, the latest available version as of this moment.

    Though the redundant b->mlen <= 0 are good catches. I may do an update for this. Thanks for the heads up.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.