[Box Backup-commit] [boxbackup/boxbackup] d1eef2: Fix GCC warnings about -Wno-* flags

GitHub noreply at github.com
Fri Dec 8 20:57:25 GMT 2017


  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: d1eef22ad42bc86dde1b542718affee926752ef4
      https://github.com/boxbackup/boxbackup/commit/d1eef22ad42bc86dde1b542718affee926752ef4
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-12-08 (Fri, 08 Dec 2017)

  Changed paths:
    M infrastructure/cmake/CMakeLists.txt

  Log Message:
  -----------
  Fix GCC warnings about -Wno-* flags

GCC suppresses warnings for -Wno-* flags unless another error occurs, so we
need to use the opposite flag for detection purposes. Add an optional second
argument to BOX_CHECK_CXX_FLAG to allow specifying that detection flag.

(cherry picked from commit dd7377e3593f96b85cf82b446fe28a86f713fe61)


  Commit: 3a4a22d3376d584167c292f3cecaaa42a156faaf
      https://github.com/boxbackup/boxbackup/commit/3a4a22d3376d584167c292f3cecaaa42a156faaf
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-12-08 (Fri, 08 Dec 2017)

  Changed paths:
    M infrastructure/makebuildenv.pl.in

  Log Message:
  -----------
  Fix build order for targets which depend on auto-generated files

These auto-generated files should always be rebuilt first, and hence must be
listed first in the dependencies. Otherwise, if we add a command to a
Protocol.txt file and also implement that command in the Commands.cpp source
file, we might try to compile Commands.cpp before rebuilding
autogen_Protocol.h, which will fail with a compile error, which prevents Make
from reaching the autogen_Protocol.cpp target which would cause the header file
to be updated as a side effect, which would resolve the compile error.

(cherry picked from commit 96de539b1abfc8b10f765183be0da97510346b42)
(cherry picked from commit 7b7f6d7b7e84e20f3b11a374f9fccee3c5194f68)


  Commit: 0d738b918a031e973f9b52fef225358ea7456a12
      https://github.com/boxbackup/boxbackup/commit/0d738b918a031e973f9b52fef225358ea7456a12
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-12-08 (Fri, 08 Dec 2017)

  Changed paths:
    M test/basicserver/TestCommands.cpp
    M test/basicserver/TestProtocol.txt
    M test/basicserver/testbasicserver.cpp

  Log Message:
  -----------
  Fix ProtocolError single-argument (subtype only) constructor

Correctly initialise mType from the ErrorType CONSTANT in the protocol message
definition in this case, instead of leaving it uninitialised. Add test. Also
test that these unexpected errors cause the connection to be closed as
expected.

Also catch SIGPIPE so that the test doesn't die when the server process closes
the connection to it.

(cherry picked from commit ed595a86cfb4d5a4cd469ba20dd3a35585004295)


  Commit: 95e69633c8766f9b7faca45dad8919d0f96b146b
      https://github.com/boxbackup/boxbackup/commit/95e69633c8766f9b7faca45dad8919d0f96b146b
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-12-08 (Fri, 08 Dec 2017)

  Changed paths:
    M test/basicserver/testbasicserver.cpp

  Log Message:
  -----------
  Check for both SocketReadError and SocketWriteError

Depending on timing, we might get to send our message (in the test) and then
fail to read the reply, or fail during writing instead.

(cherry picked from commit 93cc703003af595f4f3577cfa3b622b712fa488f)


  Commit: 493081a8a13ff402cda79aa79c686f0dc53d46c3
      https://github.com/boxbackup/boxbackup/commit/493081a8a13ff402cda79aa79c686f0dc53d46c3
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-12-08 (Fri, 08 Dec 2017)

  Changed paths:
    M infrastructure/m4/boxbackup_tests.m4
    M lib/common/Utils.cpp

  Log Message:
  -----------
  Enable -Werror=writable-strings and fix one such error

(cherry picked from commit a766d1449c13f81495c7746965e153f28621e0e1)


  Commit: 5aa37b291c17c09a454bae219b67fc23b7a61d09
      https://github.com/boxbackup/boxbackup/commit/5aa37b291c17c09a454bae219b67fc23b7a61d09
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-12-08 (Fri, 08 Dec 2017)

  Changed paths:
    M lib/win32/getopt_long.cpp

  Log Message:
  -----------
  Only replace getopt on Windows, not any other platform

The preprocessor test was wrong, causing this code to be built (and potentially
replace the system getopt/long) on all platforms. This made it impossible to
build with -Werror=writable-strings on Unix without modifying this file further
to fix its casting of static strings to mutable pointers.

(cherry picked from commit c062dbe9da9037fd7059d0c3801d91a1f1e8a12d)


Compare: https://github.com/boxbackup/boxbackup/compare/dd7377e3593f...5aa37b291c17


More information about the Boxbackup-commit mailing list