mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Fix compilation failure in ATF due to gcc4.6.0 "improvements." RT #25598.
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
|||||||
|
3146. [test] Fixed gcc4.6.0 errors in ATF. [RT #25598]
|
||||||
|
|
||||||
--- 9.9.0a1 released ---
|
--- 9.9.0a1 released ---
|
||||||
|
|
||||||
3145. [test] Capture output of ATF unit tests in "./atf.out" if
|
3145. [test] Capture output of ATF unit tests in "./atf.out" if
|
||||||
|
@@ -52,16 +52,13 @@ public:
|
|||||||
char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
|
char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
|
||||||
|
|
||||||
int ch;
|
int ch;
|
||||||
bool zflag;
|
|
||||||
|
|
||||||
// Given that this obviously is an application, and that we used the
|
// Given that this obviously is an application, and that we used the
|
||||||
// same driver to start, we can test getopt(3) right here without doing
|
// same driver to start, we can test getopt(3) right here without doing
|
||||||
// any fancy stuff.
|
// any fancy stuff.
|
||||||
zflag = false;
|
|
||||||
while ((ch = ::getopt(argc, argv, ":Z")) != -1) {
|
while ((ch = ::getopt(argc, argv, ":Z")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'Z':
|
case 'Z':
|
||||||
zflag = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
|
@@ -301,13 +301,12 @@ atf_check_result_init(atf_check_result_t *r, const char *const *argv,
|
|||||||
const atf_fs_path_t *dir)
|
const atf_fs_path_t *dir)
|
||||||
{
|
{
|
||||||
atf_error_t err;
|
atf_error_t err;
|
||||||
const char *workdir;
|
|
||||||
|
|
||||||
r->pimpl = malloc(sizeof(struct atf_check_result_impl));
|
r->pimpl = malloc(sizeof(struct atf_check_result_impl));
|
||||||
if (r->pimpl == NULL)
|
if (r->pimpl == NULL)
|
||||||
return atf_no_memory_error();
|
return atf_no_memory_error();
|
||||||
|
|
||||||
workdir = atf_config_get("atf_workdir");
|
(void) atf_config_get("atf_workdir");
|
||||||
|
|
||||||
err = array_to_list(argv, &r->pimpl->m_argv);
|
err = array_to_list(argv, &r->pimpl->m_argv);
|
||||||
if (atf_is_error(err))
|
if (atf_is_error(err))
|
||||||
|
@@ -135,13 +135,12 @@ capture_stream_process(void *v, atf_process_child_t *c)
|
|||||||
{
|
{
|
||||||
struct capture_stream *s = v;
|
struct capture_stream *s = v;
|
||||||
|
|
||||||
bool eof;
|
|
||||||
switch (s->m_base.m_type) {
|
switch (s->m_base.m_type) {
|
||||||
case stdout_type:
|
case stdout_type:
|
||||||
eof = read_line(atf_process_child_stdout(c), &s->m_msg);
|
(void) read_line(atf_process_child_stdout(c), &s->m_msg);
|
||||||
break;
|
break;
|
||||||
case stderr_type:
|
case stderr_type:
|
||||||
eof = read_line(atf_process_child_stderr(c), &s->m_msg);
|
(void) read_line(atf_process_child_stderr(c), &s->m_msg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE;
|
UNREACHABLE;
|
||||||
|
@@ -54,16 +54,13 @@ ATF_TC_BODY(getopt, tc)
|
|||||||
char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
|
char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
|
||||||
|
|
||||||
int ch;
|
int ch;
|
||||||
bool zflag;
|
|
||||||
|
|
||||||
/* Given that this obviously is a test program, and that we used the
|
/* Given that this obviously is a test program, and that we used the
|
||||||
* same driver to start, we can test getopt(3) right here without doing
|
* same driver to start, we can test getopt(3) right here without doing
|
||||||
* any fancy stuff. */
|
* any fancy stuff. */
|
||||||
zflag = false;
|
|
||||||
while ((ch = getopt(argc, argv, ":Z")) != -1) {
|
while ((ch = getopt(argc, argv, ":Z")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'Z':
|
case 'Z':
|
||||||
zflag = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
|
Reference in New Issue
Block a user