mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libvmdump: Fix -Wrestrict warning
Get rid of the following GCC8 compile warning by using different buffers
for input/output:
In file included from vmdump_convert.cpp:13:
vm_dump.h: In member function ‘void VMDump::ebcAsc(char*, size_t)
const’:
vm_dump.h:145:26: warning: passing argument 2 to restrict-qualified
parameter aliases with argument 4 [-Wrestrict]
iconv(ebcdicAsciiConv, &inout, &len, &inout, &len);
^~~~~~ ~~~~~~
vm_dump.h:145:34: warning: passing argument 3 to restrict-qualified
parameter aliases with argument 5 [-Wrestrict]
iconv(ebcdicAsciiConv, &inout, &len, &inout, &len);
^~~~ ~~~~
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
+8
-2
@@ -140,9 +140,15 @@ protected:
|
||||
} __packed;
|
||||
|
||||
/* Methods */
|
||||
inline void ebcAsc(char *inout, size_t len) const
|
||||
inline void ebcAsc(char *in, char *out, size_t size) const
|
||||
{
|
||||
iconv(ebcdicAsciiConv, &inout, &len, &inout, &len);
|
||||
size_t size_out = size;
|
||||
size_t size_in = size;
|
||||
size_t rc;
|
||||
|
||||
rc = iconv(ebcdicAsciiConv, &in, &size_in, &out, &size_out);
|
||||
if (rc == (size_t) -1)
|
||||
throw(DumpException("Code page translation EBCDIC-ASCII failed"));
|
||||
}
|
||||
|
||||
/* Members */
|
||||
|
||||
Reference in New Issue
Block a user