Skip to content

Commit

Permalink
msys2-runtime: reintroduce this != NULL checks
Browse files Browse the repository at this point in the history
While GNU C++ thinks of these as serious programming errors, the truth
is: those checks are not cosmetic. The reason is that we sometimes
execute methods via pointers that *sometimes* happen to be NULL.

So those checks are essential and we have no business removing them.

To make things compile again, we specifically ask GNU C++ very politely
and in the nicest manner to please shut up already about those `this !=
NULL` checks.

This fixes git-for-windows/git#1316

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 5, 2017
1 parent e9d0a2b commit f2caef9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions msys2-runtime/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=2.9.0
pkgrel=3
pkgrel=4
pkgdesc="Cygwin POSIX emulation engine"
arch=('i686' 'x86_64')
url="https://www.cygwin.com/"
Expand Down Expand Up @@ -185,7 +185,6 @@ prepare() {
git am --committer-date-is-author-date "${srcdir}"/0048-Handle-ORIGINAL_PATH-just-like-PATH.patch
git am --committer-date-is-author-date "${srcdir}"/0049-Refuse-to-send-job-control-signals-to-Win32-processe.patch
git am --committer-date-is-author-date "${srcdir}"/0050-Make-paths-WCS-MBS-conversion-explicit.patch
git am --committer-date-is-author-date "${srcdir}"/0051-Avoid-comparing-this-to-NULL.patch
git am --committer-date-is-author-date "${srcdir}"/0052-Avoid-assert-this-statements.patch
git am --committer-date-is-author-date "${srcdir}"/0053-Fix-possible-segmentation-fault-in-strnstr-on-64-bit.patch
git am --committer-date-is-author-date "${srcdir}"/0054-Revert-cygwin-only-expose-dev-con-in-out-sole-when-s.patch
Expand All @@ -205,8 +204,8 @@ build() {
OPTIM="-O2"
fi

CFLAGS="$OPTIM -pipe -ggdb -Wno-error=frame-address -fno-delete-null-pointer-checks"
CXXFLAGS="$OPTIM -pipe -ggdb -Wno-error=frame-address -fno-delete-null-pointer-checks"
CFLAGS="$OPTIM -pipe -ggdb -Wno-error=frame-address -Wno-error=nonnull-compare -fno-delete-null-pointer-checks"
CXXFLAGS="$OPTIM -pipe -ggdb -Wno-error=frame-address -Wno-error=nonnull-compare -fno-delete-null-pointer-checks"

"${srcdir}"/msys2-runtime/configure \
--prefix=/usr \
Expand Down

0 comments on commit f2caef9

Please sign in to comment.