]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix compilation failure in ATF due to gcc4.6.0 "improvements." RT #25598.
authorScott Mann <smann@isc.org>
Wed, 24 Aug 2011 19:53:11 +0000 (19:53 +0000)
committerScott Mann <smann@isc.org>
Wed, 24 Aug 2011 19:53:11 +0000 (19:53 +0000)
CHANGES
unit/atf-src/atf-c++/detail/application_test.cpp
unit/atf-src/atf-c/check.c
unit/atf-src/atf-c/detail/process_test.c
unit/atf-src/atf-c/tp_test.c

diff --git a/CHANGES b/CHANGES
index 497b571ec78cf73cd580b16db28f6f9b08f11d6d..d7ba6677d8237cee299ee8148a9374e04e51036d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3146.   [test]         Fixed gcc4.6.0 errors in ATF. [RT #25598]
+
        --- 9.9.0a1 released ---
 
 3145.  [test]          Capture output of ATF unit tests in "./atf.out" if
index 7fa1cd6ab610af4ed08700d079dd1e51a1cd2033..ca7dfe2472756f31140b009d642a8167165ff498 100644 (file)
@@ -52,16 +52,13 @@ public:
         char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
 
         int ch;
-        bool zflag;
 
         // 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
         // any fancy stuff.
-        zflag = false;
         while ((ch = ::getopt(argc, argv, ":Z")) != -1) {
             switch (ch) {
             case 'Z':
-                zflag = true;
                 break;
 
             case '?':
index 86c00c5cd4379007b87e3aa1cc9b8547c4a04948..610063ba1d1714206d152d69dedd471df88fb492 100644 (file)
@@ -301,13 +301,12 @@ atf_check_result_init(atf_check_result_t *r, const char *const *argv,
                       const atf_fs_path_t *dir)
 {
     atf_error_t err;
-    const char *workdir;
 
     r->pimpl = malloc(sizeof(struct atf_check_result_impl));
     if (r->pimpl == NULL)
         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);
     if (atf_is_error(err))
index feafa1dc4a0828b4d86725b61fd4e349873c4381..b76500d9350a0ad28dff8c6767523ac6b75b0ae2 100644 (file)
@@ -135,13 +135,12 @@ capture_stream_process(void *v, atf_process_child_t *c)
 {
     struct capture_stream *s = v;
 
-    bool eof;
     switch (s->m_base.m_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;
     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;
     default:
         UNREACHABLE;
index 54d9e3568c21890321aabe0e6be4a04f54975770..fc48ef928ff43f6d74f639da7a00748b6860bc20 100644 (file)
@@ -54,16 +54,13 @@ ATF_TC_BODY(getopt, tc)
     char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
 
     int ch;
-    bool zflag;
 
     /* 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
      * any fancy stuff. */
-    zflag = false;
     while ((ch = getopt(argc, argv, ":Z")) != -1) {
         switch (ch) {
         case 'Z':
-            zflag = true;
             break;
 
         case '?':