Wed Oct 9 01:18:55 2019 UTC ()
the cast police is looking for me.


(christos)
diff -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c++/build.cpp
diff -r1.11 -r1.12 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -r1.5 -r1.6 src/external/bsd/atf/dist/tools/process.cpp

cvs diff -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-c++/build.cpp (expand / switch to unified diff)

--- src/external/bsd/atf/dist/atf-c++/build.cpp 2010/10/20 09:14:20 1.1.1.2
+++ src/external/bsd/atf/dist/atf-c++/build.cpp 2019/10/09 01:18:55 1.2
@@ -53,27 +53,27 @@ cargv_to_argv(const atf_list_t* l) @@ -53,27 +53,27 @@ cargv_to_argv(const atf_list_t* l)
53 53
54 atf_list_citer_t iter; 54 atf_list_citer_t iter;
55 atf_list_for_each_c(iter, l) 55 atf_list_for_each_c(iter, l)
56 aux.push_back(static_cast< const char* >(atf_list_citer_data(iter))); 56 aux.push_back(static_cast< const char* >(atf_list_citer_data(iter)));
57 57
58 return atf::process::argv_array(aux); 58 return atf::process::argv_array(aux);
59} 59}
60 60
61inline 61inline
62atf::process::argv_array 62atf::process::argv_array
63cargv_to_argv_and_free(char** l) 63cargv_to_argv_and_free(char** l)
64{ 64{
65 try { 65 try {
66 atf::process::argv_array argv((const char* const*)l); 66 atf::process::argv_array argv(const_cast<const char* const*>(l));
67 atf_utils_free_charpp(l); 67 atf_utils_free_charpp(l);
68 return argv; 68 return argv;
69 } catch (...) { 69 } catch (...) {
70 atf_utils_free_charpp(l); 70 atf_utils_free_charpp(l);
71 throw; 71 throw;
72 } 72 }
73} 73}
74 74
75// ------------------------------------------------------------------------ 75// ------------------------------------------------------------------------
76// Free functions. 76// Free functions.
77// ------------------------------------------------------------------------ 77// ------------------------------------------------------------------------
78 78
79atf::process::argv_array 79atf::process::argv_array

cvs diff -r1.11 -r1.12 src/external/bsd/atf/dist/atf-sh/atf-check.cpp (expand / switch to unified diff)

--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp 2019/10/04 09:19:18 1.11
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp 2019/10/09 01:18:55 1.12
@@ -488,27 +488,27 @@ decode(const std::string& s) @@ -488,27 +488,27 @@ decode(const std::string& s)
488 case 'b': c = '\b'; break; 488 case 'b': c = '\b'; break;
489 case 'c': break; 489 case 'c': break;
490 case 'e': c = 033; break; 490 case 'e': c = 033; break;
491 case 'f': c = '\f'; break; 491 case 'f': c = '\f'; break;
492 case 'n': c = '\n'; break; 492 case 'n': c = '\n'; break;
493 case 'r': c = '\r'; break; 493 case 'r': c = '\r'; break;
494 case 't': c = '\t'; break; 494 case 't': c = '\t'; break;
495 case 'v': c = '\v'; break; 495 case 'v': c = '\v'; break;
496 case '\\': break; 496 case '\\': break;
497 case '0': 497 case '0':
498 { 498 {
499 int count = 3; 499 int count = 3;
500 c = 0; 500 c = 0;
501 while (--count >= 0 && (unsigned)(s[i] - '0') < 8) 501 while (--count >= 0 && static_cast<unsigned>(s[i] - '0') < 8)
502 c = (c << 3) + (s[i++] - '0'); 502 c = (c << 3) + (s[i++] - '0');
503 break; 503 break;
504 } 504 }
505 default: 505 default:
506 --i; 506 --i;
507 break; 507 break;
508 } 508 }
509 } 509 }
510 510
511 res.push_back(c); 511 res.push_back(c);
512 } 512 }
513 513
514 return res; 514 return res;

cvs diff -r1.5 -r1.6 src/external/bsd/atf/dist/tools/process.cpp (expand / switch to unified diff)

--- src/external/bsd/atf/dist/tools/process.cpp 2018/02/04 01:41:05 1.5
+++ src/external/bsd/atf/dist/tools/process.cpp 2019/10/09 01:18:55 1.6
@@ -92,28 +92,27 @@ safe_dup(const int oldfd, const int newf @@ -92,28 +92,27 @@ safe_dup(const int oldfd, const int newf
92 throw tools::system_error(IMPL_NAME "::safe_dup", 92 throw tools::system_error(IMPL_NAME "::safe_dup",
93 "Could not allocate file descriptor", 93 "Could not allocate file descriptor",
94 errno); 94 errno);
95 } else { 95 } else {
96 ::close(oldfd); 96 ::close(oldfd);
97 } 97 }
98 } 98 }
99} 99}
100 100
101static 101static
102int 102int
103const_execvp(const char *file, const char *const *argv) 103const_execvp(const char *file, const char *const *argv)
104{ 104{
105#define UNCONST(a) ((void *)(unsigned long)(const void *)(a)) 105 return ::execvp(file, const_cast<char* const*>(argv));
106 return ::execvp(file, (char* const*)(UNCONST(argv))); 
107#undef UNCONST 106#undef UNCONST
108} 107}
109 108
110void 109void
111detail::do_exec(void *v) 110detail::do_exec(void *v)
112{ 111{
113 struct exec_args *ea = reinterpret_cast<struct exec_args *>(v); 112 struct exec_args *ea = reinterpret_cast<struct exec_args *>(v);
114 113
115 if (ea->m_prehook != NULL) 114 if (ea->m_prehook != NULL)
116 ea->m_prehook(); 115 ea->m_prehook();
117 116
118 const int ret = const_execvp(ea->m_prog.c_str(), ea->m_argv.exec_argv()); 117 const int ret = const_execvp(ea->m_prog.c_str(), ea->m_argv.exec_argv());
119 const int errnocopy = errno; 118 const int errnocopy = errno;