Loading libs/binder/IServiceManager.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <inttypes.h> #include <unistd.h> #include <condition_variable> #include <android-base/properties.h> #include <android/os/BnServiceCallback.h> Loading Loading @@ -642,7 +643,7 @@ public: protected: // Override realGetService for ServiceManagerShim::waitForService. Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) { Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) override { *_aidl_return = getDeviceService({"-g", name}, mOptions); return Status::ok(); } Loading libs/binder/Parcel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2768,7 +2768,7 @@ void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize, const bin } if (type == BINDER_TYPE_FD) { // FDs from the kernel are always owned FdTag(flat->handle, 0, this); FdTag(flat->handle, nullptr, this); } minOffset = offset + sizeof(flat_binder_object); } Loading libs/binder/RecordedTransaction.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -230,8 +230,8 @@ std::optional<RecordedTransaction> RecordedTransaction::fromFile(const unique_fd } size_t memoryMappedSize = chunkPayloadSize + mmapPayloadStartOffset; void* mappedMemory = mmap(NULL, memoryMappedSize, PROT_READ, MAP_SHARED, fd.get(), mmapPageAlignedStart); void* mappedMemory = mmap(nullptr, memoryMappedSize, PROT_READ, MAP_SHARED, fd.get(), mmapPageAlignedStart); auto mmap_guard = make_scope_guard( [mappedMemory, memoryMappedSize] { munmap(mappedMemory, memoryMappedSize); }); Loading Loading @@ -382,7 +382,7 @@ android::status_t RecordedTransaction::dumpToFile(const unique_fd& fd) const { return UNKNOWN_ERROR; } if (NO_ERROR != writeChunk(fd, END_CHUNK, 0, NULL)) { if (NO_ERROR != writeChunk(fd, END_CHUNK, 0, nullptr)) { ALOGE("Failed to write end chunk to fd %d", fd.get()); return UNKNOWN_ERROR; } Loading libs/binder/Stability.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ bool Stability::requiresVintfDeclaration(const sp<IBinder>& binder) { } void Stability::tryMarkCompilationUnit(IBinder* binder) { (void)setRepr(binder, getLocalLevel(), REPR_NONE); std::ignore = setRepr(binder, getLocalLevel(), REPR_NONE); } // after deprecation of the VNDK, these should be aliases. At some point Loading libs/binder/include/binder/Parcel.h +1 −1 Original line number Diff line number Diff line Loading @@ -1009,7 +1009,7 @@ private: typename std::enable_if_t<is_specialization_v<CT, std::vector>, bool> = true> status_t writeData(const CT& c) { using T = first_template_type_t<CT>; // The T in CT == C<T, ...> if (c.size() > std::numeric_limits<int32_t>::max()) return BAD_VALUE; if (c.size() > static_cast<size_t>(std::numeric_limits<int32_t>::max())) return BAD_VALUE; const auto size = static_cast<int32_t>(c.size()); writeData(size); if constexpr (is_pointer_equivalent_array_v<T>) { Loading Loading
libs/binder/IServiceManager.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <inttypes.h> #include <unistd.h> #include <condition_variable> #include <android-base/properties.h> #include <android/os/BnServiceCallback.h> Loading Loading @@ -642,7 +643,7 @@ public: protected: // Override realGetService for ServiceManagerShim::waitForService. Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) { Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) override { *_aidl_return = getDeviceService({"-g", name}, mOptions); return Status::ok(); } Loading
libs/binder/Parcel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2768,7 +2768,7 @@ void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize, const bin } if (type == BINDER_TYPE_FD) { // FDs from the kernel are always owned FdTag(flat->handle, 0, this); FdTag(flat->handle, nullptr, this); } minOffset = offset + sizeof(flat_binder_object); } Loading
libs/binder/RecordedTransaction.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -230,8 +230,8 @@ std::optional<RecordedTransaction> RecordedTransaction::fromFile(const unique_fd } size_t memoryMappedSize = chunkPayloadSize + mmapPayloadStartOffset; void* mappedMemory = mmap(NULL, memoryMappedSize, PROT_READ, MAP_SHARED, fd.get(), mmapPageAlignedStart); void* mappedMemory = mmap(nullptr, memoryMappedSize, PROT_READ, MAP_SHARED, fd.get(), mmapPageAlignedStart); auto mmap_guard = make_scope_guard( [mappedMemory, memoryMappedSize] { munmap(mappedMemory, memoryMappedSize); }); Loading Loading @@ -382,7 +382,7 @@ android::status_t RecordedTransaction::dumpToFile(const unique_fd& fd) const { return UNKNOWN_ERROR; } if (NO_ERROR != writeChunk(fd, END_CHUNK, 0, NULL)) { if (NO_ERROR != writeChunk(fd, END_CHUNK, 0, nullptr)) { ALOGE("Failed to write end chunk to fd %d", fd.get()); return UNKNOWN_ERROR; } Loading
libs/binder/Stability.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ bool Stability::requiresVintfDeclaration(const sp<IBinder>& binder) { } void Stability::tryMarkCompilationUnit(IBinder* binder) { (void)setRepr(binder, getLocalLevel(), REPR_NONE); std::ignore = setRepr(binder, getLocalLevel(), REPR_NONE); } // after deprecation of the VNDK, these should be aliases. At some point Loading
libs/binder/include/binder/Parcel.h +1 −1 Original line number Diff line number Diff line Loading @@ -1009,7 +1009,7 @@ private: typename std::enable_if_t<is_specialization_v<CT, std::vector>, bool> = true> status_t writeData(const CT& c) { using T = first_template_type_t<CT>; // The T in CT == C<T, ...> if (c.size() > std::numeric_limits<int32_t>::max()) return BAD_VALUE; if (c.size() > static_cast<size_t>(std::numeric_limits<int32_t>::max())) return BAD_VALUE; const auto size = static_cast<int32_t>(c.size()); writeData(size); if constexpr (is_pointer_equivalent_array_v<T>) { Loading