diff options
author | Jose <jose@zeroc.com> | 2011-10-28 00:14:45 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-10-28 00:14:45 +0200 |
commit | 2f4637c56eb2f4e2d5e66e3f5bf29274c8335813 (patch) | |
tree | b98bbe9222ae780e8d6d5e6726cf1568944dda59 /cpp/src/slice2cpp/Gen.cpp | |
parent | ICE-4708 - Regression generated code for default-value (diff) | |
download | ice-2f4637c56eb2f4e2d5e66e3f5bf29274c8335813.tar.bz2 ice-2f4637c56eb2f4e2d5e66e3f5bf29274c8335813.tar.xz ice-2f4637c56eb2f4e2d5e66e3f5bf29274c8335813.zip |
slice2cpp fir for clang warning
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 762d7203d31..ed0346f9dd8 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1020,7 +1020,12 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) C << sp << nl << "#ifdef __APPLE__"; string initfuncname = "__F" + p->flattenedScope() + p->name() + "__initializer"; - C << nl << "extern \"C\" { void " << initfuncname << "() {} }"; + C << nl << "extern \"C\" {"; + C.inc(); + C << nl << "void " << initfuncname << "();"; + C << nl << "void " << initfuncname << "() {}"; + C.dec(); + C << nl << "}"; C << nl << "#endif"; } H << eb << ';'; @@ -4421,7 +4426,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << nl << "static " << factoryName << "__Init " << factoryName << "__i;"; C << sp << nl << "#ifdef __APPLE__"; std::string initfuncname = "__F" + p->flattenedScope() + p->name() + "__initializer"; - C << nl << "extern \"C\" { void " << initfuncname << "() {} }"; + C << nl << "extern \"C\" {"; + C.inc(); + C << nl << "void " << initfuncname << "();"; + C << nl << "void " << initfuncname << "() {}"; + C.dec(); + C << nl << "}"; C << nl << "#endif"; } } |