[lxc-devel] [lxc/lxc] fb3b3e: compiler: -Wlogical-op hardening

Stéphane Graber noreply at github.com
Tue Feb 5 21:55:38 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: fb3b3ef484f0679534ec60764e47056102e43057
      https://github.com/lxc/lxc/commit/fb3b3ef484f0679534ec60764e47056102e43057
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: -Wlogical-op hardening

Warn about suspicious uses of logical operators in expressions.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: cc0c3a061298b0c74377195a7b7a94671affb9cb
      https://github.com/lxc/lxc/commit/cc0c3a061298b0c74377195a7b7a94671affb9cb
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac
    M src/tests/Makefile.am

  Log Message:
  -----------
  compiler: -Wmissing-include-dirs hardening

Warn if a user-supplied include directory does not exist.

This already surfaced a bug that is fixed by this commit.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 11af5f2ba169c63b4da2980a6688028502c5fe7b
      https://github.com/lxc/lxc/commit/11af5f2ba169c63b4da2980a6688028502c5fe7b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: -Wold-style-definition hardening

Warn if an old-style function definition is used. A warning is given
even if there is a previous prototype.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: f03f7b5ce566d9601b83eb52ca1221d167157192
      https://github.com/lxc/lxc/commit/f03f7b5ce566d9601b83eb52ca1221d167157192
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: -Winit-self hardening

Warn about uninitialized variables that are initialized with themselves.
Note this option can only be used with the -Wuninitialized option.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 30462b914460df7c75b3b32b622952ef9b0cd1df
      https://github.com/lxc/lxc/commit/30462b914460df7c75b3b32b622952ef9b0cd1df
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: -Wfloat-equal hardening

Warn if floating-point values are used in equality comparisons.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: e3b4674d44ee6da22c091fd154b6ff62123d3aa2
      https://github.com/lxc/lxc/commit/e3b4674d44ee6da22c091fd154b6ff62123d3aa2
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac
    M src/tests/state_server.c

  Log Message:
  -----------
  compiler: -Wsuggest-attribute=noreturn hardening

Warn about functions that might be candidates for attributes pure, const
or noreturn or malloc.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 13311d70fe3061f98c3feb502a1dee787454e33d
      https://github.com/lxc/lxc/commit/13311d70fe3061f98c3feb502a1dee787454e33d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: -Werror=return-type hardening

Warn whenever a function is defined with a return type that defaults to
int. Also warn about any return statement with no return value in a
function whose return type is not void (falling off the end of the
function body is considered returning without a value).

For C only, warn about a return statement with an expression in a
function whose return type is void, unless the expression type is also
void. As a GNU extension, the latter case is accepted without a warning
unless -Wpedantic is used.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 42a2ab35f45437d8266898633d9e09608ecd2f13
      https://github.com/lxc/lxc/commit/42a2ab35f45437d8266898633d9e09608ecd2f13
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: -Werror=incompatible-pointer-types

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: d07545c7da57156eb9ee8f04999f9dfb9bc53380
      https://github.com/lxc/lxc/commit/d07545c7da57156eb9ee8f04999f9dfb9bc53380
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac
    M src/lxc/criu.c
    M src/lxc/log.c
    M src/lxc/pam/pam_cgfs.c
    M src/lxc/storage/lvm.c
    M src/lxc/string_utils.c

  Log Message:
  -----------
  compiler: -Wformat=2 hardening

Enable -Wformat plus additional format checks. Currently equivalent to
-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 55733496733d30f53bd5b37c8e27ab1028111518
      https://github.com/lxc/lxc/commit/55733496733d30f53bd5b37c8e27ab1028111518
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac

  Log Message:
  -----------
  compiler: set -Wimplicit-fallthrough to 5

-Wimplicit-fallthrough=5 doesn’t recognize any comments as fallthrough
comments, only attributes disable the warning.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: a7547c5c34f5a5f4d754acee7e224602dfbda966
      https://github.com/lxc/lxc/commit/a7547c5c34f5a5f4d754acee7e224602dfbda966
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M src/lxc/attach.c
    M src/lxc/cmd/lxc_user_nic.c
    M src/lxc/conf.c
    M src/lxc/criu.c
    M src/lxc/log.h
    M src/lxc/lxccontainer.c
    M src/lxc/network.c
    M src/lxc/storage/overlay.c
    M src/lxc/storage/storage.c
    M src/lxc/storage/zfs.c
    M src/lxc/tools/lxc_info.c
    M src/lxc/tools/lxc_ls.c
    M src/lxc/tools/lxc_unshare.c
    M src/tests/share_ns.c
    M src/tests/state_server.c

  Log Message:
  -----------
  compiler: -Wshadow hardening

Warn whenever a local variable or type declaration shadows another
variable, parameter, type, class member (in C++), or instance variable
(in Objective-C) or whenever a built-in function is shadowed.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 4e950c76ed607eff0ce26d97db44e4495f558106
      https://github.com/lxc/lxc/commit/4e950c76ed607eff0ce26d97db44e4495f558106
  Author: Stéphane Graber <stgraber at stgraber.org>
  Date:   2019-02-05 (Tue, 05 Feb 2019)

  Changed paths:
    M configure.ac
    M src/lxc/attach.c
    M src/lxc/cmd/lxc_user_nic.c
    M src/lxc/conf.c
    M src/lxc/criu.c
    M src/lxc/log.c
    M src/lxc/log.h
    M src/lxc/lxccontainer.c
    M src/lxc/network.c
    M src/lxc/pam/pam_cgfs.c
    M src/lxc/storage/lvm.c
    M src/lxc/storage/overlay.c
    M src/lxc/storage/storage.c
    M src/lxc/storage/zfs.c
    M src/lxc/string_utils.c
    M src/lxc/tools/lxc_info.c
    M src/lxc/tools/lxc_ls.c
    M src/lxc/tools/lxc_unshare.c
    M src/tests/Makefile.am
    M src/tests/share_ns.c
    M src/tests/state_server.c

  Log Message:
  -----------
  Merge pull request #2823 from brauner/2019-02-05/compiler_based_hardening

compiler: hardening


Compare: https://github.com/lxc/lxc/compare/1fba6a85896c...4e950c76ed60


More information about the lxc-devel mailing list