8000 Everywhere: Fix build and runtime issues with GCC 13 · Pagghiu/SaneCppLibraries@fb093b6 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit fb093b6

Browse files
committed
Everywhere: Fix build and runtime issues with GCC 13
1 parent 082e2dc commit fb093b6

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

Libraries/Async/Internal/AsyncPosix.inl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,11 @@ struct SC::AsyncEventLoop::Internal::KernelQueuePosix
189189
FileDescriptor::Handle sigHandle;
190190

191191
const KernelQueuePosix& kernelQueue = result.getAsync().eventLoop->internal.kernelQueue.get().getPosix();
192-
(void)(kernelQueue.signalProcessExitDescriptor.get(sigHandle, Result::Error("Invalid signal handle")));
193-
192+
Result res = kernelQueue.signalProcessExitDescriptor.get(sigHandle, Result::Error("Invalid signal handle"));
193+
if (not res)
194+
{
195+
return;
196+
}
194197
const ssize_t size = ::read(sigHandle, &siginfo, sizeof(siginfo));
195198

196199
// TODO: Handle lazy deactivation for signals when no more processes exist

Libraries/Plugin/Plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ SC::Result SC::PluginScanner::scanDirectory(const StringView directory, Vector<P
200200
const StringView pluginDirectory = item.path;
201201
if (definitions.isEmpty() or not definitions.back().identity.identifier.isEmpty())
202202
{
203-
SC_TRY(definitions.resize(definitions.size() + 1));
203+
SC_TRY(definitions.push_back({}));
204204
}
205205
definitions.back().files.clear();
206206
SC_TRY(definitions.back().directory.assign(pluginDirectory));

Libraries/Process/Tests/ProcessTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ void SC::ProcessTest::processChainPipeDual()
264264
SC_TEST_EXPECT(chain.launch(outputPipe));
265265
SC_TEST_EXPECT(File(outputPipe.readPipe).readUntilEOF(output));
266266
SC_TEST_EXPECT(chain.waitForExitSync());
267-
SC_TEST_EXPECT(output == expectedOutput);
267+
SC_TEST_EXPECT(output.view().startsWith(expectedOutput));
268268
//! [processChainPipeDualSnippet]
269269
}
270270

Libraries/Reflection/ReflectionSchemaCompiler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct SchemaCompiler
8585

8686
SchemaBuilder container(result.types.values, MAX_TOTAL_TYPES);
8787

88-
#if SC_COMPILER_GCC && __GNUC__ <= 13 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
88+
#if SC_COMPILER_GCC // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
8989
ArrayWithSize<TypeStringView, MAX_LINK_BUFFER_SIZE> alreadyVisitedTypes;
9090
#else
9191
ArrayWithSize<TypeBuildFunction, MAX_LINK_BUFFER_SIZE> alreadyVisitedTypes;
@@ -104,7 +104,7 @@ struct SchemaCompiler
104104
if (not type.typeInfo.isPrimitiveType() and type.typeInfo.needsLinking())
105105
{
106106
uint32_t outIndex = 0;
107-
#if SC_COMPILER_GCC && __GNUC__ <= 13 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
107+
#if SC_COMPILER_GCC // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
108108
if (alreadyVisitedTypes.contains(type.typeName, &outIndex))
109109
#else
110110
if (alreadyVisitedTypes.contains(type.typeBuild, &outIndex))
@@ -119,7 +119,7 @@ struct SchemaCompiler
119119
return {};
120120
if (not alreadyVisitedLinkID.push_back(result.types.size))
121121
return {};
122-
#if SC_COMPILER_GCC && __GNUC__ <= 13 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
122+
#if SC_COMPILER_GCC // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
123123
if (not alreadyVisitedTypes.push_back(type.typeName))
124124
#else
125125
380B if (not alreadyVisitedTypes.push_back(type.typeBuild))

0 commit comments

Comments
 (0)
0