Skip to content

Commit

Permalink
treewide: avoid fatal warnings from gcc7
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Feb 10, 2018
1 parent 5699a12 commit 0a941e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkgs/development/compilers/openjdk/7.nix
Expand Up @@ -69,7 +69,10 @@ let
fontconfig perl file bootjdk
];

NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
NIX_CFLAGS_COMPILE = [
"-Wno-error=deprecated-declarations"
"-Wno-error=format-overflow" # newly detected by gcc7
];

NIX_LDFLAGS = if minimal then null else "-lfontconfig -lXcursor -lXinerama";

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libwps/default.nix
Expand Up @@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ boost librevenge zlib ];

NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; # newly detected by gcc-7

meta = with stdenv.lib; {
homepage = http://libwps.sourceforge.net/;
description = "Microsoft Works document format import filter library";
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/usbredir/default.nix
Expand Up @@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
};

# Works around bunch of "format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}'" warnings
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.is64bit) "-Wno-error=format";
NIX_CFLAGS_COMPILE = stdenv.lib.optional (!stdenv.is64bit) "-Wno-error=format"
++ [ "-Wno-error=format-truncation" ]; # newly detected with gcc-7

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libusb ];
Expand Down

0 comments on commit 0a941e0

Please sign in to comment.