From 8a33408c5ed4686c781b24bffab97338743bfeb5 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Sat, 8 Mar 2025 12:19:05 -0800 Subject: [PATCH] Use `nullptr` in faiss/gpu/StandardGpuResources.cpp Summary: `nullptr` is preferable to `0` or `NULL`. Let's use it everywhere so we can enable `-Wzero-as-null-pointer-constant`. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: dtolnay Differential Revision: D70818157 --- faiss/gpu/StandardGpuResources.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/gpu/StandardGpuResources.cpp b/faiss/gpu/StandardGpuResources.cpp index 39ee38efa9..649b7cb5cf 100644 --- a/faiss/gpu/StandardGpuResources.cpp +++ b/faiss/gpu/StandardGpuResources.cpp @@ -411,7 +411,7 @@ void StandardGpuResourcesImpl::initializeForDevice(int device) { raftHandles_.emplace(std::make_pair(device, defaultStream)); #endif - cudaStream_t asyncCopyStream = 0; + cudaStream_t asyncCopyStream = nullptr; CUDA_VERIFY( cudaStreamCreateWithFlags(&asyncCopyStream, cudaStreamNonBlocking));