diff --git a/java/src/main/native/src/CompiledExpression.cpp b/java/src/main/native/src/CompiledExpression.cpp index a18c88e10dc..6f6e1ac52a7 100644 --- a/java/src/main/native/src/CompiledExpression.cpp +++ b/java/src/main/native/src/CompiledExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,7 +59,7 @@ class jni_serialized_ast { check_for_eof(sizeof(T)); // use memcpy since data may be misaligned T result; - memcpy(&result, data_ptr, sizeof(T)); + memcpy(reinterpret_cast(&result), data_ptr, sizeof(T)); data_ptr += sizeof(T); return result; }