From a0cf4ad95a1cc350f2f2c4f0a24cbf2c37c1a4d8 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 5 Jan 2024 18:41:07 -0800 Subject: Use operator<< with String16 rather than char16_t* std::stringstream's operator<< overload for char16_t* is deleted after upgrading libc++ because it surprisingly outputs an address rather than string content. See wg21.link/p1423r3. Bug: 175635923 Test: m MODULES-IN-frameworks-native-cmds-cmd Change-Id: I90602eca166d5da347f7efba22f21bc1a5d38a11 --- cmds/cmd/cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/cmd/cmd.cpp') diff --git a/cmds/cmd/cmd.cpp b/cmds/cmd/cmd.cpp index 0ce7711574..9695e07753 100644 --- a/cmds/cmd/cmd.cpp +++ b/cmds/cmd/cmd.cpp @@ -95,7 +95,7 @@ public: flags = O_RDWR; checkRead = checkWrite = true; } else { - mErrorLog << "Invalid mode requested: " << mode.c_str() << endl; + mErrorLog << "Invalid mode requested: " << mode << endl; return -EINVAL; } int fd = open(fullPath.c_str(), flags, S_IRWXU|S_IRWXG); -- cgit v1.2.3-59-g8ed1b