diff options
author | Jose <jose@zeroc.com> | 2016-11-02 17:13:33 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-11-02 17:13:33 +0100 |
commit | fc59215217ecabfcb7b9c9b7f6fcf6c788e96388 (patch) | |
tree | 6c30202583c97bd39e8d5690cd0fdbc4174aee8e /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | Windows build fix - warning C4100: tuple: unreferenced formal parameter (diff) | |
download | ice-fc59215217ecabfcb7b9c9b7f6fcf6c788e96388.tar.bz2 ice-fc59215217ecabfcb7b9c9b7f6fcf6c788e96388.tar.xz ice-fc59215217ecabfcb7b9c9b7f6fcf6c788e96388.zip |
Fixed (ICE-7440) - unreferenced local parameter in generated code
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index dd282d5b68e..4ae02b9372f 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -1519,7 +1519,15 @@ Slice::writeStreamHelpers(Output& out, out << nl << "template<typename S>"; out << nl << "struct StreamWriter" << (cpp11 ? "<" : "< ") << fullName << ", S>"; out << sb; - out << nl << "static void write(S* __os, const " << fullName << "& v)"; + if(requiredMembers.empty() && optionalMembers.empty()) + { + out << nl << "static void write(S*, const " << fullName << "&)"; + } + else + { + out << nl << "static void write(S* __os, const " << fullName << "& v)"; + } + out << sb; if(cpp11) @@ -1550,7 +1558,15 @@ Slice::writeStreamHelpers(Output& out, out << nl << "template<typename S>"; out << nl << "struct StreamReader" << (cpp11 ? "<" : "< ") << fullName << ", S>"; out << sb; - out << nl << "static void read(S* __is, " << fullName << "& v)"; + if (requiredMembers.empty() && optionalMembers.empty()) + { + out << nl << "static void read(S*, " << fullName << "&)"; + } + else + { + out << nl << "static void read(S* __is, " << fullName << "& v)"; + } + out << sb; if(cpp11) |