aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2021-04-13 07:59:20 -0700
committerAlistair Delva <adelva@google.com>2021-04-15 22:29:26 +0000
commit8d7cf5d6c3aaeb1a54254ba303a9d7aa1c9f004e (patch)
tree1fd507de107704ebd9d0d7baa7062947dd21a9ee
parentc33b84ba89ba038a45a1ce4a98e7783db27e30e5 (diff)
downloadmtools-8d7cf5d6c3aaeb1a54254ba303a9d7aa1c9f004e.tar.gz
FROMLIST: Fix invalid use of iconv_t*
When building this file against glibc, no warnings are seen. However, when building for an arm64 Android target (using the bionic glibc), the following warning is seen: external/mtools/charsetConv.c:119:7: error: incompatible pointer types assigning to 'iconv_t *' (aka 'struct __iconv_t **') from 'iconv_t' (aka 'struct __iconv_t *') [-Werror,-Wincompatible-pointer-types] from = iconv_open(wcharCp, dosCp); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ The code looks wrong; it shouldn't be using iconv_t*, rather it should use iconv_t, like the rest of the file. Fix it. Bug: 185191460 Link: https://lists.gnu.org/archive/html/info-mtools/2021-04/msg00001.html Test: lunch aosp_cf_arm64_phone-userdebug && m -j32 hosttar Change-Id: I00d87913bb3ce126878d0cd8c94911e4841e7350
-rw-r--r--charsetConv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/charsetConv.c b/charsetConv.c
index 8734be5..085d887 100644
--- a/charsetConv.c
+++ b/charsetConv.c
@@ -102,8 +102,8 @@ doscp_t *cp_open(int codepage)
{
char dosCp[17];
doscp_t *ret;
- iconv_t *from;
- iconv_t *to;
+ iconv_t from;
+ iconv_t to;
if(codepage == 0)
codepage = mtools_default_codepage;