mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
Use Utils::StrDup in place of strdup
This avoids warnings about strdup being deprecated in favour of _strdup on Windows. TEST=manual build, observe no warnings are produced Bug: https://github.com/flutter/flutter/issues/59199 Change-Id: Ide390f3a719b9598bea0fc9976be3fb337f4de37 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242386 Reviewed-by: Alexander Aprelev <aam@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
d8b0237e54
commit
eabec1c6a5
|
@ -5,6 +5,7 @@
|
|||
#include "platform/globals.h"
|
||||
|
||||
#include "include/dart_tools_api.h"
|
||||
#include "platform/utils.h"
|
||||
#include "vm/dart_api_impl.h"
|
||||
#include "vm/dart_entry.h"
|
||||
#include "vm/debugger.h"
|
||||
|
@ -23,7 +24,7 @@ static void TestPrinter(const char* buffer) {
|
|||
free(const_cast<char*>(test_output_));
|
||||
test_output_ = NULL;
|
||||
}
|
||||
test_output_ = strdup(buffer);
|
||||
test_output_ = Utils::StrDup(buffer);
|
||||
|
||||
// Also print to stdout to see the overall result.
|
||||
OS::PrintErr("%s", test_output_);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "vm/tags.h"
|
||||
|
||||
#include "platform/utils.h"
|
||||
#include "vm/isolate.h"
|
||||
#include "vm/json_stream.h"
|
||||
#include "vm/native_entry.h"
|
||||
|
@ -159,7 +160,7 @@ void UserTags::AddStreamableTagName(const char* tag) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
subscribed_tags_.Add(strdup(tag));
|
||||
subscribed_tags_.Add(Utils::StrDup(tag));
|
||||
}
|
||||
|
||||
void UserTags::RemoveStreamableTagName(const char* tag) {
|
||||
|
|
Loading…
Reference in a new issue