use [[gnu::...]] attributes

This commit is contained in:
Max Kellermann
2023-03-06 15:57:36 +01:00
parent 3b9aab0684
commit 42f6a0441c
101 changed files with 167 additions and 234 deletions

View File

@@ -67,7 +67,7 @@ BufferedOutputStream::Format(const char *fmt, ...)
std::size_t size = vsnprintf((char *)r.data(), r.size(), fmt, ap);
va_end(ap);
if (gcc_unlikely(size >= r.size())) {
if (size >= r.size()) [[unlikely]] {
/* buffer was not large enough; flush it and try
again */
@@ -75,7 +75,7 @@ BufferedOutputStream::Format(const char *fmt, ...)
r = buffer.Write();
if (gcc_unlikely(size >= r.size())) {
if (size >= r.size()) [[unlikely]] {
/* still not enough space: grow the buffer and
try again */
++size;