Dear all,

we are now at less than 1000 issues in the
c-code-quality results, which is already pretty
good (see graphic below).

NaviServer compiles as well pretty clean with the
newest gcc5/clang-3.6 and "--std=c99 -pedantic",
except for one problem:
conversion between object and function pointers.
In general, C does not guarantee that a function pointer
has the same size as an (data) object pointer, so casts
between these are dangerous. On the common
architectures this is not a problem, but still, the issue shows
up as a warning. It was not hard to fix the issue on most
occasions, but i have not touched the following area:

NaviServer (and AOLserver) allows to store information
per function pointer via
   Ns_RegisterProcInfo() / Ns_GetProcInfo()

However, it uses Tcl's hash tables, which use (void *) or
strings as keys. void pointers are object pointers, so
one cannot pass it a function pointer. The solution
is to look probably into custom hash types/coding
of the pointers/different lookups.

all the best
-g




We started with 16.000 (or 18.000?) issues in
NaviServer, and now we are well below 3.000. There are still
a couple of things, i want to address...

NaviServer compares already quite well with other projects.
PostgreSQL shows in 0.28 issues per LOC [1],
AOLserver 0.73, and NaviServer is now at 0.19.

             PostgreSQL Aolserver       NaviServer
LOC          487895     18743           14081
Issues       140262     13712           2664
Issues/LOC   0,2875     0,7316          0,1892

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to