summaryrefslogtreecommitdiff
path: root/libsysutils/src/SocketClient.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-09-13 11:08:41 -0700
committerChih-hung Hsieh <chh@google.com>2018-09-17 16:50:11 +0000
commit502f4864d6c92fce4cb0e4f7f2b12d7124da902b (patch)
treeb34cb377a8a6543fb0baf68e566b120209b3aaf9 /libsysutils/src/SocketClient.cpp
parentc2501fda600ea2067099c1de042e3db7acde74ee (diff)
Suppress implicit-fallthrough warnings.
Add FALLTHROUGH_INTENDED for clang compiler. Bug: 112564944 Test: build with global -Wimplicit-fallthrough. Change-Id: I40f8bbf94e207c9dd90921e9b762ba51abab5777
Diffstat (limited to 'libsysutils/src/SocketClient.cpp')
-rw-r--r--libsysutils/src/SocketClient.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp
index 0625db781..fe2f3d668 100644
--- a/libsysutils/src/SocketClient.cpp
+++ b/libsysutils/src/SocketClient.cpp
@@ -27,6 +27,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include <android-base/file.h>
+#include <android-base/macros.h>
#include <log/log.h>
#include <sysutils/SocketClient.h>
@@ -145,7 +147,8 @@ char *SocketClient::quoteArg(const char *arg) {
switch (*arg) {
case '\\':
case '"':
- *(current++) = '\\'; // fallthrough
+ *(current++) = '\\';
+ FALLTHROUGH_INTENDED;
default:
*(current++) = *(arg++);
}