nsf.c

Clone Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- address coverty CID 102646

- address covertiy CID 88773

- remove expression which were always true

- turn for() loop into a repeat-until loop, since in first iteration, the loop controlling expression was always true

- address coverty CID 88774

- address coverty issue 88776

- move assertion after assingment

  1. … 1 more file in changeset.
- move dereferencing of members after assertions

  1. … 3 more files in changeset.
- fix potential bug on tcl-triggered cmd-delete operations, where destroy returns non-TCL_OK and name of the object could not be retrieved anymore in error message.

  1. … 1 more file in changeset.
- attempt to make Coverty happy (CID 88769)

- removed NsfParamDefs.slotObj (and single occurance for memory-management) since it is not used for the time being

  1. … 2 more files in changeset.
- remove test, since it is covered already by assertions

  1. … 1 more file in changeset.
- write body-blocks of if on separate lines - change variable name "validCscPtr" to "isValidCsc", since it is a boolean and not a ptr (tcl coding guidelines) - prefer explicit comparisons

  1. … 2 more files in changeset.
MethodDispatch(): Fix compiler warning on typecast mismatch

ResolveMethodName(): Guard against potential null pointer dereference (CID 88771).

FreeAllNsfObjectsAndClasses(): Remove unneeded NULL check as dereferencing already occurred before; check for NULL earlier (CID 88780)

MakeProc(): Silence false-positive warning, due to missing returns_nonnull annotation (CID 88770).

nsf.c: Check return values of GetObjectFromObj explicitly (CID 88763, 88764, 88765).

ObjectSystemsCheckSystemMethod(): Mark TCL_ERROR path as unlikely

ObjectSystemsCheckSystemMethod(): Re-order control flow to remove otherwise dead IF-branch (CID 88768)

NsfMethodPropertyCmd(): Dropped option 'slotobj' as it is obsolete. Also fixes CID 88767. See TODO for further cleanup steps.

  1. … 3 more files in changeset.
ListMethod(): Make sure that 'info method exists' returns 0 for (plain) NX objects; added some tests

  1. … 2 more files in changeset.
ListCmdParams(): Removed logically dead code (CID 88779).

Improve profiling support - added profile support for undispatched methods (i.e. implemented via CallDirectly) - new function for controlling profile trace nsf:__profile_trace -enable /bool/ ?-verbose /bool/?

C-code generator:

- allow type boolean for non-positional arguments

  1. … 7 more files in changeset.
- changed trace facility to append to a variable to minimize interactions for results and return codes, which happen via nsf::log. - added more convenient function for adding to DStrings: Nsf_DStringPrintf - renamed NsfDStringPrintf to NsfDStringVPrintf - replaced complex macros for tracing by functions

  1. … 8 more files in changeset.
- added experimental "nsf::configure trace" feature, which can be enabled when compiled with profile support. trace turns on automatically profile

  1. … 4 more files in changeset.
- improve cleanness of compilation when "-pedantic" is used

  1. … 2 more files in changeset.
- move assignments after assertions

  1. … 2 more files in changeset.
- prefer const over CONST unless Tcl API

  1. … 6 more files in changeset.
- align log levels with NaviServer/AOLserver

  1. … 1 more file in changeset.