Merging CL https://widevine-internal-review.googlesource.com/c/cdm/+/100924 Fix implicit type conversion issue in ODK 1. Implicit cast is reported as error when compiling ODK with Level3 2. Override odk_add_overflow_xxx function with the built in functions can cause redefinition issue when compiling Level3; Let's use odk customized overflow functions. Bug: b/157510403 Test: ODK unittests and CDM unittests passed. Change-Id: Ieef8ccfb41d08007ec72f4a061f92968e55539cb
24 lines
605 B
C
24 lines
605 B
C
/* Copyright 2019 Google LLC. All rights reserved. This file and proprietary */
|
|
/* source code may only be used and distributed under the Widevine Master */
|
|
/* License Agreement. */
|
|
|
|
#ifndef WIDEVINE_ODK_SRC_ODK_OVERFLOW_H_
|
|
#define WIDEVINE_ODK_SRC_ODK_OVERFLOW_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int odk_sub_overflow_u64(uint64_t a, uint64_t b, uint64_t* c);
|
|
int odk_add_overflow_u64(uint64_t a, uint64_t b, uint64_t* c);
|
|
int odk_add_overflow_ux(size_t a, size_t b, size_t* c);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* WIDEVINE_ODK_SRC_ODK_OVERFLOW_H_ */
|