summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-11-02 17:13:33 +0100
committerJose <jose@zeroc.com>2016-11-02 17:13:33 +0100
commitfc59215217ecabfcb7b9c9b7f6fcf6c788e96388 (patch)
tree6c30202583c97bd39e8d5690cd0fdbc4174aee8e /cpp/src
parentWindows build fix - warning C4100: tuple: unreferenced formal parameter (diff)
downloadice-fc59215217ecabfcb7b9c9b7f6fcf6c788e96388.tar.bz2
ice-fc59215217ecabfcb7b9c9b7f6fcf6c788e96388.tar.xz
ice-fc59215217ecabfcb7b9c9b7f6fcf6c788e96388.zip
Fixed (ICE-7440) - unreferenced local parameter in generated code
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp20
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)