0
and ODM_NOERROR
from ODMSTATUS
Category: Functionality - Defect Incident ID: X000900 Priority: 5 - Important Status: Repair Pending Component: Odma.h, version 2.0.0 Assigned To: Dennis Hamilton Reported By:
Dennis Hamilton (2000-09-09)Date Opened: 2000-09-10 Date Closed: none
In the ODMA 1.0 Specification,
ODMSTATUS
value0
is defined as the successful result.In the ODMA 1.5 Specification,
ODMSTATUS
value0
continues to be defined as the successful result for those operations preserved from ODMA 1.0. In addition,ODMSTATUS
valueODM_NOERROR
is specified as the successful result for new operations introduced in ODMA 1.5. In theOdma.h
file for ODMA 1.5,ODM_NOERROR
is correctly defined to0
, preserving downward compatibility and the usability of0
as the status code for a successful operation.In the ODMA 2.0 Specification,
ODMSTATUS
valueODM_SUCCESS
is the only defined value for a successful result. In theOdma.h
version 2.0.0,ODM_SUCCESS
is correctly defined to0
, preserving downward compatibility. However, the valueODM_NOERROR
is no longer defined inOdma.h
, violating the downward compatibility commitment: An ODMA-1.5-compliant program will not compile successfully using version 2.0.0 of theOdma.h
file.This is a problem for source-code reuse and rebuilding of source code with newer library files. The binary forms of ODMA-1.5-compliant components will operate properly because only the symbolic name has changed, not the actual value used for successful results.
- The update of
Odma.h
2.0.0 to version 2.0.1 will defineODM_NOERROR
to be the same asODM_SUCCESS
and there will be appropriate cautionary remarks about these always having to have value0
.- There will be no change to the documentation or the ODMA 2.0 Specification. The steps taken to preserve downward compatibility will be documented with the ODMA 2.0 library files.
- As a matter of good practice, new and revised ODMA-compliant components should be programmed to confirm
ODM_SUCCESS
without depending on its value being known to be0
. E.g., use
if (rc != ODM_SUCCESS) return rc;
rather than
if (rc) return rc
;Recommendations to this effect will be implicit in new examples and sample software, as well as in any programming tips and programmers guides that are developed.
- The ODMA 1.0, ODMA 1.5, and OMDA 2.0 specifications were compared as part of producing Q000705 on changes between ODMA versions. The use of
0
in pre-ODMA-2.0 specifications, and the introduction ofODM_NOERROR
in ODMA 1.5 was noticed then.- The ODMA 1.5 version of
Odma.h
was inspected to confirm thatODM_NOERROR
is defined and is0
for downward compatibility.- The ODMA 2.0 header file,
Odma.h
version 2.0.0, was inspected to confirm thatODM_SUCCESS
preserves downward compatibility with 0 but thatODM_NOERROR
is no longer defined.
created 2000-09-10-11:58 -0700 (pdt) by orcmid
$$Author: Orcmid $
$$Date: 00-09-10 13:12 $
$$Revision: 3 $