automoc: avoid more compiler warnings in linker-warning-silencing code

Revise the approach from commit 844244ccdc (automoc: avoid compiler
warnings in linker-warning-silencing code, 2022-08-10, v3.24.1~6^2)
to avoid `-Wmissing-declarations` warnings too.

Issue: #23823
This commit is contained in:
Albert Astals Cid
2022-08-29 00:14:53 +02:00
committed by Brad King
parent 9b4efcb92f
commit fc8628389f

View File

@@ -2183,6 +2183,9 @@ void cmQtAutoMocUicT::JobMocsCompilationT::Process()
content += "// No files found that require moc or the moc files are "
"included\n"
"void " +
functionName +
"();\n"
"void " +
functionName + "() {}\n";
} else {
// Valid content