AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/c/splint_3.1.2_os4.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Splint 3.1.2
Author:http://www.splint.org
Uploader:Mathias \'Corto\' Parnaudeau
Type:dev/c
Version:3.1.2
Architecture:ppc-amigaos
Date:2009-01-25
Requires:AmigaOS4 and its SDK
Download:dev/c/splint_3.1.2_os4.lha - View contents
Readme:dev/c/splint_3.1.2_os4.readme
Downloads:1087

Splint (http://www.splint.org) is a tool for statically checking C programs
for security vulnerabilities and coding mistakes.
It is a great tool for developers to improve their code with rules stricter 
than the compiler's ones (even gcc with -Wall).


The short story about this port

I compiled it years ago on MorphOS and recently I tried to port it to OS4. 
I was not totally convinced by this quick and dirty port but some days later 
Tcheko told me I've just ported splint 3.1.2 for MorphOS. I was pleased 
to see an update for MorphOS too and I was motivated to improve the OS4 port. 
So we started to talk with Tcheko, about our work and also about a common 
release.
     -- Corto--

Yes, MorphOS and OS4 developers can work together to bring better sofware, 
it was already the case with SQLite.

We did separate archives but please consider them as a common port !


Compilation (what I did)

AmigaOS 4 is seen as UNIX when there are ifdef.

Modified files in directory src/ :
- Headers/osd.h : Changed the path separator, the temporary dir
- llmain.c : fixed the detection of file ".splintrc"
- osd.c : here are the major changed but that's logical, this is the source 
related to OS dependant stuff
- Makefile : added "-lm -lunix" in places where there was "-lfl"


Standard installation (recommended)

- Copy "splint" and ".splintrc" in "SDK:Local/C"
- Create the directory "SDK:Local/share/splint"
- Copy directories "lib" and "imports" into it
- Define a CPATH setenv which indicates the system includes path :
setenv CPATH "SDK:clib2/include"
- Copy ENV:CPATH into ENVARC:
Note : I added "-ISDK:Include/include_h" in ".splintrc"


Custom installation

- Unarchive where you want, let us call it MYDIR (for example "Work:splint")
- Set environments variables :
LARCH_PATH must be MYDIR/lib
LCLIMPORTDIR must be MYDIR/imports
- Set them in ENVARC :
copy ENV:LARCH_PATH ENVARC:
copy ENV:LCLIMPORTDIR ENVARC:
- Create CPATH like described above

splint also uses the file ".splintrc" if it exists, it defines some rules. 
I did write some minimal rules that are mandatory, mainly for the parsing 
of OS headers. For example, it defines these constants :
-D__amigaos4__, -D__GNUC__ and -D__PPC__


Launch

Here I am explaining how to run splint trying to give you some advices.

To run splint in a shell, basically :

splint filetocheck.c

Note that "-D__amigaos4__" is mandatory for a correct parsing of proto files. 
The problem is that there are errors like "Function IDOS->Close called 
with 1 args, expects 2". This is certainly due to interface declarations.
If the program does not use explicit interface pointers, the error becomes 
"Unrecognized identifier: Close".

At the beginning I suggest you to add the command parameter "-weak" to set 
splint in a mode less strict :

splint -weak filetocheck.c


Limitations

- The problem of the number of parameters in function calls
- Do not support relative file path with parent directories like 
"splint //example.c". Just do "cd //" and "splint example.c" or use 
the absolute path. Fix that would need deeper changes and that's not 
a big constraint.
- Tests on code warnings are almost all good running the whole testsuite ... 
but it may be right enough for a normal behaviour. There is one spec warning 
for each test with this message : "LSL signature parsing: can't find file 
Work:splint/lib/CTrait.syms containing".


Contents of dev/c/splint_3.1.2_os4.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                   60      61  98.4% -lh5- f4ad Nov 16 11:45 splint_3.1.2_os4/.splintrc
[generic]               482890  545847  88.5% -lh5- 9ad4 Nov 11 13:31 splint_3.1.2_os4/doc/manual.pdf
[generic]                   51      51 100.0% -lh0- af1d Nov  9 18:52 splint_3.1.2_os4/imports/assert.lcl
[generic]                  861    4136  20.8% -lh5- 24dc Nov  9 18:52 splint_3.1.2_os4/imports/assert.lcs
[generic]                  143     936  15.3% -lh5- a72b Nov  9 18:52 splint_3.1.2_os4/imports/ctype.lcl
[generic]                  931    4784  19.5% -lh5- d73e Nov  9 18:52 splint_3.1.2_os4/imports/ctype.lcs
[generic]                  516    1077  47.9% -lh5- 3457 Nov  9 18:52 splint_3.1.2_os4/imports/errno.lcl
[generic]                 2289   14207  16.1% -lh5- a4d6 Nov  9 18:52 splint_3.1.2_os4/imports/errno.lcs
[generic]                  404    2004  20.2% -lh5- a93b Nov  9 18:52 splint_3.1.2_os4/imports/limits.lcl
[generic]                 2196   12634  17.4% -lh5- 33c1 Nov  9 18:52 splint_3.1.2_os4/imports/limits.lcs
[generic]                  323     772  41.8% -lh5- fc4f Nov  9 18:52 splint_3.1.2_os4/imports/locale.lcl
[generic]                 2618   16919  15.5% -lh5- 90c8 Nov  9 18:52 splint_3.1.2_os4/imports/locale.lcs
[generic]                 2536    7058  35.9% -lh5- c0a4 Nov  9 18:52 splint_3.1.2_os4/imports/Makefile
[generic]                  326     625  52.2% -lh5- 5b9d Nov  9 18:52 splint_3.1.2_os4/imports/Makefile.am
[generic]                 2472    6788  36.4% -lh5- 3927 Nov  9 18:52 splint_3.1.2_os4/imports/Makefile.in
[generic]                  511    2512  20.3% -lh5- 20e0 Nov  9 18:52 splint_3.1.2_os4/imports/math.lcl
[generic]                 3445   23470  14.7% -lh5- 9a18 Nov  9 18:52 splint_3.1.2_os4/imports/math.lcs
[generic]                  418    1999  20.9% -lh5- c35c Nov  9 18:52 splint_3.1.2_os4/imports/setjmp.lcl
[generic]                 3445   22692  15.2% -lh5- 39a5 Nov  9 18:52 splint_3.1.2_os4/imports/setjmp.lcs
[generic]                  991    3753  26.4% -lh5- d777 Nov  9 18:52 splint_3.1.2_os4/imports/signal.lcl
[generic]                 4955   33424  14.8% -lh5- d636 Nov  9 18:52 splint_3.1.2_os4/imports/signal.lcs
[generic]                  281     477  58.9% -lh5- 065e Nov  9 18:52 splint_3.1.2_os4/imports/stdarg.lcl
[generic]                 4369   30425  14.4% -lh5- f24a Nov  9 18:52 splint_3.1.2_os4/imports/stdarg.lcs
[generic]                  728    3130  23.3% -lh5- 9b52 Nov  9 18:52 splint_3.1.2_os4/imports/stdio.lcl
[generic]                 2498   17007  14.7% -lh5- d0b6 Nov  9 18:52 splint_3.1.2_os4/imports/stdio.lcs
[generic]                  903    3237  27.9% -lh5- 0f14 Nov  9 18:52 splint_3.1.2_os4/imports/stdlib.lcl
[generic]                 1891   12115  15.6% -lh5- 6020 Nov  9 18:52 splint_3.1.2_os4/imports/stdlib.lcs
[generic]                  183    1027  17.8% -lh5- c074 Nov  9 18:52 splint_3.1.2_os4/imports/string.lcl
[generic]                 5582   42297  13.2% -lh5- 56cb Nov  9 18:52 splint_3.1.2_os4/imports/string.lcs
[generic]                  183    1027  17.8% -lh5- c074 Nov  9 18:52 splint_3.1.2_os4/imports/strings.lcl
[generic]                 5582   42297  13.2% -lh5- 56cb Nov  9 18:52 splint_3.1.2_os4/imports/strings.lcs
[generic]                  529    1411  37.5% -lh5- 49b1 Nov  9 18:52 splint_3.1.2_os4/imports/time.lcl
[generic]                 7171   53675  13.4% -lh5- 3aa8 Nov  9 18:52 splint_3.1.2_os4/imports/time.lcs
[generic]                  367     799  45.9% -lh5- dd6d Nov  9 18:52 splint_3.1.2_os4/lib/bool.h
[generic]                  551    2730  20.2% -lh5- b354 Nov  9 18:52 splint_3.1.2_os4/lib/CTrait.syms
[generic]                   36      36 100.0% -lh0- 1042 Nov  9 18:52 splint_3.1.2_os4/lib/CTraitGen.lcl
[generic]                  188     434  43.3% -lh5- 95fe Nov  9 18:52 splint_3.1.2_os4/lib/file.mts
[generic]                  407    1002  40.6% -lh5- 408c Nov  9 18:52 splint_3.1.2_os4/lib/file.xh
[generic]                  256     784  32.7% -lh5- 8cac Nov  9 18:52 splint_3.1.2_os4/lib/filerw.mts
[generic]                  178     317  56.2% -lh5- 9248 Nov  9 18:52 splint_3.1.2_os4/lib/filerw.xh
[generic]                  323     778  41.5% -lh5- 9198 Nov  9 18:52 splint_3.1.2_os4/lib/lclinit.lci
[generic]                 2762    8448  32.7% -lh5- 427e Nov  9 18:52 splint_3.1.2_os4/lib/linux.h
[generic]                  396     901  44.0% -lh5- e683 Nov  9 18:52 splint_3.1.2_os4/lib/lslinit.lsi
[generic]                 2838    8424  33.7% -lh5- 4d9b Nov  9 18:52 splint_3.1.2_os4/lib/Makefile
[generic]                  671    1999  33.6% -lh5- 0fe9 Nov  9 18:52 splint_3.1.2_os4/lib/Makefile.am
[generic]                 2780    8158  34.1% -lh5- 88cf Nov  9 18:52 splint_3.1.2_os4/lib/Makefile.in
[generic]                 6071   23646  25.7% -lh5- 16fc Nov  9 18:52 splint_3.1.2_os4/lib/posix.h
[generic]                12869   52470  24.5% -lh5- d1d0 Nov  9 18:52 splint_3.1.2_os4/lib/posix.lcd
[generic]                12750   51787  24.6% -lh5- 3159 Nov  9 18:52 splint_3.1.2_os4/lib/posixstrict.lcd
[generic]                 7838   39260  20.0% -lh5- 51c0 Nov  9 18:52 splint_3.1.2_os4/lib/standard.h
[generic]                 8066   35962  22.4% -lh5- 8760 Nov  9 18:52 splint_3.1.2_os4/lib/standard.lcd
[generic]                 7936   35206  22.5% -lh5- 2754 Nov  9 18:52 splint_3.1.2_os4/lib/standardstrict.lcd
[generic]                 1515    5102  29.7% -lh5- e8f7 Nov  9 18:52 splint_3.1.2_os4/lib/stdio.h
[generic]                 1882    7164  26.3% -lh5- f97f Nov  9 18:52 splint_3.1.2_os4/lib/stdlib.h
[generic]                  178     453  39.3% -lh5- fe32 Nov  9 18:52 splint_3.1.2_os4/lib/tainted.mts
[generic]                  522    2288  22.8% -lh5- 6619 Nov  9 18:52 splint_3.1.2_os4/lib/tainted.xh
[generic]                14156   60961  23.2% -lh5- cea6 Nov  9 18:52 splint_3.1.2_os4/lib/unix.h
[generic]                25093  101963  24.6% -lh5- b90b Nov  9 18:52 splint_3.1.2_os4/lib/unix.lcd
[generic]                24906  101117  24.6% -lh5- bfa3 Nov  9 18:52 splint_3.1.2_os4/lib/unixstrict.lcd
[generic]              1194687 3778228  31.6% -lh5- 06d5 Jan 24 19:21 splint_3.1.2_os4/splint
[generic]                 1826    3600  50.7% -lh5- 4e5e Jan 24 19:55 splint_3.1.2_os4/splint.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        61 files 1874329 5247891  35.7%            Jan 24 21:26
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>