ports/devel/gcvs/files/patch-common_TextBinary.cpp
Jan Beich 9ad196a4cb devel/gcvs: unbreak with libc++ 3.9
AppGlue.cpp:263:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
                char *login = strchr(ccvsroot, '@');
                      ^       ~~~~~~~~~~~~~~~~~~~~~
CvsArgs.cpp:201:16: error: call to 'strchr' is ambiguous
                bool hasLF = strchr(newarg, '\n') != 0L;
                             ^~~~~~
CvsArgs.cpp:210:19: error: call to 'strchr' is ambiguous
                bool hasSpace = strchr(newarg, ' ') != 0L;
                                ^~~~~~
TextBinary.cpp:466:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
        char *tmp = strrchr(file, '.');
              ^     ~~~~~~~~~~~~~~~~~~
UCvsFiles.cpp:2020:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(r1, '.')) != 0L)
                  ^~~~~~
UCvsFiles.cpp:2028:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(r2, '.')) != 0L)
                  ^~~~~~
umenu.cpp:257:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(copy, '\t')) != 0L)
                  ^~~~~~
umenu.cpp:280:12: error: call to 'strchr' is ambiguous
        if((tmp = strchr(title, '&')) != 0L)
                  ^~~~~~

Reported by:	pkg-fallout
2017-02-01 20:23:02 +00:00

11 lines
305 B
C++

--- common/TextBinary.cpp.orig 2003-01-10 14:12:38 UTC
+++ common/TextBinary.cpp
@@ -463,7 +463,7 @@ bool SplitPath(const char *dir, CStr & u
void GetExtension(const char *file, CStr & base, CStr & ext)
{
- char *tmp = strrchr(file, '.');
+ const char *tmp = strrchr(file, '.');
if(tmp == 0L)
{