diff --git a/api/rocjpeg/rocjpeg.h b/api/rocjpeg/rocjpeg.h index 95644db62d..cf491c8b1d 100644 --- a/api/rocjpeg/rocjpeg.h +++ b/api/rocjpeg/rocjpeg.h @@ -63,6 +63,7 @@ typedef enum { ROCJPEG_STATUS_HW_JPEG_DECODER_NOT_SUPPORTED = -10, /**< Hardware JPEG decoder is not supported. */ ROCJPEG_STATUS_RUNTIME_ERROR = -11, /**< Runtime error occurred. */ ROCJPEG_STATUS_NOT_IMPLEMENTED = -12, /**< The requested feature is not implemented. */ + ROCJPEG_STATUS_MAX_VALUE = -13, /**< Maximum status code value. */ } RocJpegStatus; /** diff --git a/test/rocjpeg_negative_api_tests/rocjpeg_api_negative_tests.cpp b/test/rocjpeg_negative_api_tests/rocjpeg_api_negative_tests.cpp index f077072ad6..77eb9d8404 100644 --- a/test/rocjpeg_negative_api_tests/rocjpeg_api_negative_tests.cpp +++ b/test/rocjpeg_negative_api_tests/rocjpeg_api_negative_tests.cpp @@ -334,7 +334,7 @@ int RocJpegApiNegativeTests::TestInvalidGetErrorName() { } // Scenario 2: Pass a valid error code and ensure it returns a non-null name - for (int i = 0; i >= -8; i--) { + for (int i = 0; i >= ROCJPEG_STATUS_MAX_VALUE; i--) { RocJpegStatus valid_status = static_cast(i);; error_name = rocJpegGetErrorName(valid_status); if (error_name == nullptr) {