<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/4b13207d9f7f9aba1cc9eba266b3071318637a8c">https://github.com/macports/macports-base/commit/4b13207d9f7f9aba1cc9eba266b3071318637a8c</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 4b13207d9f7f9aba1cc9eba266b3071318637a8c
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Tue Apr 3 03:15:39 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> pextlib: Fix -Wmissing-field-initializers warnings
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> clang emits a warning for the brace initializer lists. When the buffer
</span><span style='display:block; white-space:pre;color:#404040;'> is passed to stat(2) or a similar function, remove the initializer list.
</span><span style='display:block; white-space:pre;color:#404040;'> In other cases, use memset instead.
</span>---
src/pextlib1.0/Pextlib.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/Pextlib.c b/src/pextlib1.0/Pextlib.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 19500ed..a9066c5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/Pextlib.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/Pextlib.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -808,7 +808,7 @@ static char* get_mntpoint(const char *path) {
</span> char *ret = NULL;
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- struct statfs f = { 0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct statfs f;
</span>
if (-1 != statfs(path, &f)) {
ret = strdup(f.f_mntonname);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -863,9 +863,10 @@ int fs_case_sensitive_darwin(Tcl_Interp *interp, const char *path, mount_cs_cach
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- struct attrlist attrlist = { 0 };
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- volcaps_t volcaps = { 0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct attrlist attrlist;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ volcaps_t volcaps;
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ memset(&attrlist, 0, sizeof(attrlist));
</span> attrlist.bitmapcount = ATTR_BIT_MAP_COUNT;
attrlist.volattr = ATTR_VOL_CAPABILITIES;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -951,9 +952,9 @@ int fs_case_sensitive_fallback(Tcl_Interp *interp, const char *path, mount_cs_ca
</span> *tmp_ptr_up = toupper(*tmp_ptr_up);
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- struct stat path_stat = { 0 },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lowercase_path_stat = { 0 },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- uppercase_path_stat = { 0 };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct stat path_stat,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lowercase_path_stat,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uppercase_path_stat;
</span>
if (-1 == lstat(path, &path_stat)) {
free(lowercase_path);
</pre><pre style='margin:0'>
</pre>