From 3abc51c2ca6116bcf453968d4d5d6355248502c1 Mon Sep 17 00:00:00 2001 From: Dominic Lemire Date: Thu, 23 Jan 2020 12:24:36 -0800 Subject: cmd: fix compile error in DEBUG cmd is a std::string_view, not a char* Test: compile with #define DEBUG 1 Change-Id: If5950f526bd30c339d8d183a9dd1b48860095d1c --- cmds/cmd/cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmds/cmd/cmd.cpp') diff --git a/cmds/cmd/cmd.cpp b/cmds/cmd/cmd.cpp index 7b4aeb2cc2..8dad47502f 100644 --- a/cmds/cmd/cmd.cpp +++ b/cmds/cmd/cmd.cpp @@ -223,7 +223,8 @@ int cmdMain(const std::vector& argv, TextOutput& outputLog, Te sp result = new MyResultReceiver(); #if DEBUG - ALOGD("cmd: Invoking %s in=%d, out=%d, err=%d", cmd, in, out, err); + ALOGD("cmd: Invoking %.*s in=%d, out=%d, err=%d", + static_cast(cmd.size()), cmd.data(), in, out, err); #endif // TODO: block until a result is returned to MyResultReceiver. -- cgit v1.2.3-59-g8ed1b