1. 16 6月, 2017 9 次提交
  2. 15 6月, 2017 2 次提交
    • D
      Temporarily disable format truncation warnings · f1acc413
      Daniel P. Berrange 提交于
      GCC 7.1 introduces a new -Wformat-truncation warning
      flag that reports if it thinks the maximum possible
      size of the formatted output will exceed the provided
      fixed buffer. This is enabled automatically by the
      -Wformat warning flag. There are quite a few places
      hit by this in libvirt which need rewriting. This is
      non-trivial work in some places, so temporarily
      disable the new warning until those fixes can be
      implemented.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f1acc413
    • D
      Disable the -Wduplicated-branches warning · 1ba69399
      Daniel P. Berrange 提交于
      Depending on the platform/architecture, a number of conditionals
      in libvirt code expand the same on both branches. This is expected
      behaviour and harmless, so disable the warning to avoid creating
      unexpected build failures
      
      Two examples, mingw32:
      
      ../../src/util/vircommand.c: In function 'virCommandWait':
      ../../src/util/vircommand.c:2562:51: error: this condition has identical branches [-Werror=duplicated-branches]
                   *exitstatus = cmd->rawStatus ? status : WEXITSTATUS(status);
                                                         ^
      and gcc7.1
      
      In file included from util/virobject.c:28:0:
      util/virobject.c: In function 'virClassNew':
      util/viratomic.h:176:46: error: this condition has identical branches [-Werror=duplicated-branches]
                  (void)(0 ? *(atomic) ^ *(atomic) : 0);                      \
                                                   ^
      util/virobject.c:144:20: note: in expansion of macro 'virAtomicIntInc'
          klass->magic = virAtomicIntInc(&magicCounter);
                         ^~~~~~~~~~~~~~~
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1ba69399
  3. 14 6月, 2017 8 次提交
  4. 13 6月, 2017 14 次提交
  5. 12 6月, 2017 5 次提交
  6. 09 6月, 2017 2 次提交
    • J
      qemu: report an error if usb keyboards are unsupported · 3596b1dd
      Ján Tomko 提交于
      Be nicer to the user and report a proper error instead of:
      An error occurred, but the cause is unknown
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1460086
      3596b1dd
    • R
      virsh: workaround readline prototypes warnings · 9ea3424a
      Roman Bogorodskiy 提交于
      When building with clang 4.0.0, virsh build fails like this:
      
      gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools'
        CC       virsh-virsh.o
      In file included from virsh.c:45:
      In file included from /usr/local/include/readline/readline.h:31:
      /usr/local/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef int Function () __attribute__ ((deprecated));
                           ^
                            void
      /usr/local/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef void VFunction () __attribute__ ((deprecated));
                             ^
                              void
      /usr/local/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef char *CPFunction () __attribute__ ((deprecated));
                               ^
                                void
      /usr/local/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef char **CPPFunction () __attribute__ ((deprecated));
                                 ^
                                  void
      In file included from virsh.c:45:
      /usr/local/include/readline/readline.h:385:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      extern int rl_message ();
                            ^
                             void
      5 errors generated.
      gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1
      
      Fix that by adding -D_FUNCTION_DEF to READLINE_CFLAGS to fix *Function
      related warnings and add a check for stdarg.h so we have HAVE_STDARG_H
      defined that's needed by the readline headers to use proper rl_message
      declaration.
      
      Bug report on the readline mailing list:
      
       http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00004.html
      9ea3424a