Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/atf/dist the cast police is looking for me.



details:   https://anonhg.NetBSD.org/src/rev/98d898e9f106
branches:  trunk
changeset: 464494:98d898e9f106
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 09 01:18:55 2019 +0000

description:
the cast police is looking for me.

diffstat:

 external/bsd/atf/dist/atf-c++/build.cpp    |  2 +-
 external/bsd/atf/dist/atf-sh/atf-check.cpp |  2 +-
 external/bsd/atf/dist/tools/process.cpp    |  3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r f45b71f64f59 -r 98d898e9f106 external/bsd/atf/dist/atf-c++/build.cpp
--- a/external/bsd/atf/dist/atf-c++/build.cpp   Tue Oct 08 23:03:01 2019 +0000
+++ b/external/bsd/atf/dist/atf-c++/build.cpp   Wed Oct 09 01:18:55 2019 +0000
@@ -63,7 +63,7 @@
 cargv_to_argv_and_free(char** l)
 {
     try {
-        atf::process::argv_array argv((const char* const*)l);
+        atf::process::argv_array argv(const_cast<const char* const*>(l));
         atf_utils_free_charpp(l);
         return argv;
     } catch (...) {
diff -r f45b71f64f59 -r 98d898e9f106 external/bsd/atf/dist/atf-sh/atf-check.cpp
--- a/external/bsd/atf/dist/atf-sh/atf-check.cpp        Tue Oct 08 23:03:01 2019 +0000
+++ b/external/bsd/atf/dist/atf-sh/atf-check.cpp        Wed Oct 09 01:18:55 2019 +0000
@@ -498,7 +498,7 @@
                 {
                     int count = 3;
                     c = 0;
-                    while (--count >= 0 && (unsigned)(s[i] - '0') < 8)
+                    while (--count >= 0 && static_cast<unsigned>(s[i] - '0') < 8)
                         c = (c << 3) + (s[i++] - '0');
                     break;
                 }
diff -r f45b71f64f59 -r 98d898e9f106 external/bsd/atf/dist/tools/process.cpp
--- a/external/bsd/atf/dist/tools/process.cpp   Tue Oct 08 23:03:01 2019 +0000
+++ b/external/bsd/atf/dist/tools/process.cpp   Wed Oct 09 01:18:55 2019 +0000
@@ -102,8 +102,7 @@
 int
 const_execvp(const char *file, const char *const *argv)
 {
-#define UNCONST(a) ((void *)(unsigned long)(const void *)(a))
-    return ::execvp(file, (char* const*)(UNCONST(argv)));
+    return ::execvp(file, const_cast<char* const*>(argv));
 #undef UNCONST
 }
 



Home | Main Index | Thread Index | Old Index