You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2017/08/10 01:35:58 UTC
svn commit: r1804620 - /subversion/trunk/build/generator/gen_base.py
Author: philip
Date: Thu Aug 10 01:35:58 2017
New Revision: 1804620
URL: http://svn.apache.org/viewvc?rev=1804620&view=rev
Log:
Followup to r1804618, provide a dummy error to avoid a zero-sized array.
* build/generator/gen_base.py
(GeneratorBase.write_errno_table): Provide a dummy error.
Modified:
subversion/trunk/build/generator/gen_base.py
Modified: subversion/trunk/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_base.py?rev=1804620&r1=1804619&r2=1804620&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_base.py (original)
+++ subversion/trunk/build/generator/gen_base.py Thu Aug 10 01:35:58 2017
@@ -289,8 +289,7 @@ class GeneratorBase:
])
# Remove ',' for c89 compatibility
- if len(codes):
- lines[-1] = lines[-1][0:-1]
+ lines[-1] = lines[-1][0:-1]
lines.extend([
'};',
@@ -300,9 +299,11 @@ class GeneratorBase:
# errno names can vary depending on the Python, and possibly the
# OS, version and they are not even used by normal release builds
# so omit them from the tarball. We always want the struct itself
- # so that SVN_DEBUG builds still compile.
+ # so that SVN_DEBUG builds still compile and it needs a dummy
+ # entry to avoid a zero-sized array.
write_struct('svn__errno',
- [] if self.release_mode else errno.errorcode.items())
+ [(0, "success")] if self.release_mode
+ else errno.errorcode.items())
# Fetch and write apr_errno.h codes.
aprerr = []