Skip to content

Commit

Permalink
Use [[maybe_unused]] in the old PPAPI IPC macros
Browse files Browse the repository at this point in the history
Bug: 1286390
Change-Id: Ifa10f00b9ffd9161da65258c784df8bde12b3558
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3393065
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#960663}
  • Loading branch information
Avi Drissman authored and Chromium LUCI CQ committed Jan 18, 2022
1 parent 169facd commit dfacb02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ppapi/proxy/dispatch_reply_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ void DispatchResourceReplyOrDefaultParams(
// begin the map instead of IPC_BEGIN_MESSAGE_MAP. The reason is that the macros
// in src/ipc are all closely tied together, and there might be errors for
// unused variables or other errors if they're used with these macros.
#define PPAPI_BEGIN_MESSAGE_MAP(class_name, msg) \
{ \
typedef class_name _IpcMessageHandlerClass ALLOW_UNUSED_TYPE; \
const IPC::Message& ipc_message__ = msg; \
switch (ipc_message__.type()) { \
#define PPAPI_BEGIN_MESSAGE_MAP(class_name, msg) \
{ \
using _IpcMessageHandlerClass [[maybe_unused]] = class_name; \
const IPC::Message& ipc_message__ = msg; \
switch (ipc_message__.type()) {

// Note that this only works for message with 1 or more parameters. For
// 0-parameter messages you need to use the _0 version below (since there are
Expand Down

0 comments on commit dfacb02

Please sign in to comment.