Skip to content

Commit

Permalink
Merge "Fix compilation with recent GCC" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiproietto authored and Gerrit Code Review committed Dec 27, 2023
2 parents 63ad166 + 473092c commit 5948e5c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
6 changes: 1 addition & 5 deletions include/perfetto/base/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ extern "C" void __asan_unpoison_memory_region(void const volatile*, size_t);
#endif

// Macro for telling -Wimplicit-fallthrough that a fallthrough is intentional.
#if defined(__clang__)
#define PERFETTO_FALLTHROUGH [[clang::fallthrough]]
#else
#define PERFETTO_FALLTHROUGH
#endif
#define PERFETTO_FALLTHROUGH [[fallthrough]]

namespace perfetto {
namespace base {
Expand Down
2 changes: 2 additions & 0 deletions include/perfetto/ext/base/http/sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <stddef.h>

#include <array>
#include <cstddef>
#include <cstdint>
#include <string>

namespace perfetto {
Expand Down
1 change: 1 addition & 0 deletions include/perfetto/profiling/pprof_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef INCLUDE_PERFETTO_PROFILING_PPROF_BUILDER_H_
#define INCLUDE_PERFETTO_PROFILING_PPROF_BUILDER_H_

#include <cstdint>
#include <string>
#include <vector>

Expand Down
1 change: 0 additions & 1 deletion src/base/http/sha1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "perfetto/ext/base/http/sha1.h"

#include <stddef.h>
#include <stdint.h>
#include <string.h>

// From chrome_elf/sha1/sha1.cc.
Expand Down
1 change: 1 addition & 0 deletions src/base/http/sha1_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "perfetto/ext/base/http/sha1.h"

#include <cstdint>
#include <string>

#include "perfetto/ext/base/string_view.h"
Expand Down
2 changes: 1 addition & 1 deletion src/profiling/symbolizer/symbolizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef SRC_PROFILING_SYMBOLIZER_SYMBOLIZER_H_
#define SRC_PROFILING_SYMBOLIZER_SYMBOLIZER_H_

#include <map>
#include <cstdint>
#include <string>
#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <set>
#include <utility>

#include "perfetto/base/compiler.h"
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/string_splitter.h"
Expand Down Expand Up @@ -578,7 +579,7 @@ base::Status SpanJoinOperatorTable::Cursor::Column(sqlite3_context* context,
sqlite3_result_int64(context, static_cast<sqlite3_int64>(partition));
break;
}
[[clang::fallthrough]];
PERFETTO_FALLTHROUGH;
}
default: {
size_t index = static_cast<size_t>(N);
Expand Down
1 change: 1 addition & 0 deletions src/traceconv/trace_to_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef SRC_TRACECONV_TRACE_TO_PROFILE_H_
#define SRC_TRACECONV_TRACE_TO_PROFILE_H_

#include <cstdint>
#include <iostream>
#include <vector>

Expand Down

0 comments on commit 5948e5c

Please sign in to comment.