Skip to content

Remove NDEBUG constant #5529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ext/fileinfo/libmagic.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ diff -u libmagic.orig/buffer.c libmagic/buffer.c

diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c 2019-02-20 03:35:27.000000000 +0100
+++ libmagic/cdf.c 2020-04-07 22:25:10.517321000 +0200
+++ libmagic/cdf.c 2020-05-05 18:42:24.973318200 +0200
@@ -43,7 +43,17 @@
#include <err.h>
#endif
Expand Down Expand Up @@ -1138,7 +1138,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
static size_t
cdf_check_stream(const cdf_stream_t *sst, const cdf_header_t *h)
{
+#ifndef NDEBUG
+#if PHP_DEBUG
size_t ss = sst->sst_dirlen < h->h_min_size_standard_stream ?
CDF_SHORT_SEC_SIZE(h) : CDF_SEC_SIZE(h);
assert(ss == sst->sst_ss);
Expand Down Expand Up @@ -1636,7 +1636,7 @@ diff -u libmagic.orig/encoding.c libmagic/encoding.c
}
diff -u libmagic.orig/file.h libmagic/file.h
--- libmagic.orig/file.h 2019-05-07 04:27:11.000000000 +0200
+++ libmagic/file.h 2020-04-22 20:15:46.790840100 +0200
+++ libmagic/file.h 2020-05-05 18:41:04.309311200 +0200
@@ -33,18 +33,9 @@
#ifndef __file_h__
#define __file_h__
Expand Down Expand Up @@ -2212,7 +2212,7 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
case S_IFSOCK:
diff -u libmagic.orig/funcs.c libmagic/funcs.c
--- libmagic.orig/funcs.c 2019-05-07 04:27:11.000000000 +0200
+++ libmagic/funcs.c 2020-04-14 17:15:50.737587100 +0200
+++ libmagic/funcs.c 2020-05-05 18:41:04.309311200 +0200
@@ -31,87 +31,80 @@
#endif /* lint */

Expand Down Expand Up @@ -3048,7 +3048,7 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.orig/magic.h libmagic/magic.h
--- libmagic.orig/magic.h 2020-04-22 20:17:15.432186600 +0200
--- libmagic.orig/magic.h 2020-05-05 18:42:44.544159800 +0200
+++ libmagic/magic.h 2020-04-07 22:25:10.548560600 +0200
@@ -124,6 +124,7 @@

Expand Down Expand Up @@ -3253,7 +3253,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
if (i != -1)
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c 2019-05-17 04:24:59.000000000 +0200
+++ libmagic/softmagic.c 2020-04-07 22:25:10.548560600 +0200
+++ libmagic/softmagic.c 2020-04-26 00:43:35.734037100 +0200
@@ -43,6 +43,10 @@
#include <time.h>
#include "der.h"
Expand Down
2 changes: 1 addition & 1 deletion ext/fileinfo/libmagic/cdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ cdf_zero_stream(cdf_stream_t *scn)
static size_t
cdf_check_stream(const cdf_stream_t *sst, const cdf_header_t *h)
{
#ifndef NDEBUG
#if PHP_DEBUG
size_t ss = sst->sst_dirlen < h->h_min_size_standard_stream ?
CDF_SHORT_SEC_SIZE(h) : CDF_SEC_SIZE(h);
assert(ss == sst->sst_ss);
Expand Down