From 83b4e981c4dd8b8ea521a6150a34636d10a67211 Mon Sep 17 00:00:00 2001 From: "Michael Hirsch, Ph.D" <10931741+scivision@users.noreply.github.com> Date: Mon, 18 Nov 2019 15:21:37 -0500 Subject: Use strict function prototypes --- test cases/cuda/10 cuda dependency/c/prog.c | 2 +- test cases/cuda/10 cuda dependency/cpp/prog.cc | 4 ++-- test cases/cuda/10 cuda dependency/modules/prog.cc | 6 +++--- test cases/cuda/10 cuda dependency/version_reqs/prog.cc | 4 ++-- test cases/cuda/12 cuda dependency (mixed)/prog.cpp | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'test cases/cuda') diff --git a/test cases/cuda/10 cuda dependency/c/prog.c b/test cases/cuda/10 cuda dependency/c/prog.c index 9d279a9..e2429a6 100644 --- a/test cases/cuda/10 cuda dependency/c/prog.c +++ b/test cases/cuda/10 cuda dependency/c/prog.c @@ -7,7 +7,7 @@ int cuda_devices() { return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { printf("No CUDA hardware found. Exiting.\n"); diff --git a/test cases/cuda/10 cuda dependency/cpp/prog.cc b/test cases/cuda/10 cuda dependency/cpp/prog.cc index 728debc..4832afa 100644 --- a/test cases/cuda/10 cuda dependency/cpp/prog.cc +++ b/test cases/cuda/10 cuda dependency/cpp/prog.cc @@ -1,13 +1,13 @@ #include #include -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { std::cout << "No CUDA hardware found. Exiting.\n"; diff --git a/test cases/cuda/10 cuda dependency/modules/prog.cc b/test cases/cuda/10 cuda dependency/modules/prog.cc index 7c52b3f..b4af4d4 100644 --- a/test cases/cuda/10 cuda dependency/modules/prog.cc +++ b/test cases/cuda/10 cuda dependency/modules/prog.cc @@ -2,13 +2,13 @@ #include #include -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { std::cout << "No CUDA hardware found. Exiting.\n"; @@ -24,7 +24,7 @@ int main() { } std::cout << "Initialized cuBLAS\n"; - if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { + if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { std::cout << "cuBLAS de-initialization failed. Exiting.\n"; return -1; } diff --git a/test cases/cuda/10 cuda dependency/version_reqs/prog.cc b/test cases/cuda/10 cuda dependency/version_reqs/prog.cc index e3adabf..5668830 100644 --- a/test cases/cuda/10 cuda dependency/version_reqs/prog.cc +++ b/test cases/cuda/10 cuda dependency/version_reqs/prog.cc @@ -1,13 +1,13 @@ #include #include -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { std::cout << "Compiled against CUDA version: " << CUDART_VERSION << "\n"; int runtime_version = 0; cudaError_t r = cudaRuntimeGetVersion(&runtime_version); diff --git a/test cases/cuda/12 cuda dependency (mixed)/prog.cpp b/test cases/cuda/12 cuda dependency (mixed)/prog.cpp index daf9102..85e5148 100644 --- a/test cases/cuda/12 cuda dependency (mixed)/prog.cpp +++ b/test cases/cuda/12 cuda dependency (mixed)/prog.cpp @@ -4,13 +4,13 @@ void do_cuda_stuff(); -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { std::cout << "No CUDA hardware found. Exiting.\n"; @@ -28,7 +28,7 @@ int main() { } std::cout << "Initialized cuBLAS\n"; - if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { + if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { std::cout << "cuBLAS de-initialization failed. Exiting.\n"; return -1; } -- cgit v1.1