delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/12/27/18:45:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Splint startup
Date: Thu, 27 Dec 2007 15:41:33 -0800 (PST)
Organization: http://groups.google.com
Lines: 173
Message-ID: <b06fa7fc-f86c-4b47-9047-366c06dd6976@e6g2000prf.googlegroups.com>
References: <0JTM002HO7ZOWZQ0 AT mta4 DOT srv DOT hcvlny DOT cv DOT net> <f8917a89-2ded-41eb-a348-eeb0f9ac8c01 AT e25g2000prg DOT googlegroups DOT com>
<0JTO00KXYP2V4UM0 AT mta3 DOT srv DOT hcvlny DOT cv DOT net>
NNTP-Posting-Host: 88.68.48.114
Mime-Version: 1.0
X-Trace: posting.google.com 1198798894 15630 127.0.0.1 (27 Dec 2007 23:41:34 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Thu, 27 Dec 2007 23:41:34 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: e6g2000prf.googlegroups.com; posting-host=88.68.48.114;
posting-account=OsAajgoAAADdKJnkJkmhzqP0jo6I_P_0
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us)
AppleWebKit/48 (like Gecko) Safari/48,gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Ethan Rosenberg schrieb:

> At 05:01 PM 12/26/2007, you wrote:

[snip]

> I am running DOS 7.1, which is a 16 bit OS, if that makes any difference.
>
> I only tried it on one(1) file, which I sent in my previous email.


I do not know what DOS 7.1 is.  I have tested it only on my WinXP home
SP2.
If it is possible to run any other djgpp compiled application then
it must be possible to run splint too.  The important issue is if
there is LFN support or not.  I have found that there is a file in
the binary distribution that is not 8.3 clean.
This is /dev/env/DJDIR/share/splint/lib/standardstrict.lcd and it
will collide with /dev/env/DJDIR/share/splint/lib/standard.lcd
during unzipping if there is no LFN support available.  But this
has no influence on the output that splint produces.  I have removed
standardstrict.lcd and run splint with your sources and it produced
the same output that with standard.lcd removed and replaced with
standardstrict.lcd after renaming it to standard.lcd.  I have run
splint with your code stored in a file I have called 1.c issuing
the following command line:
  splint 1.c


> The following two statements are in my autoexec.bat
>
> SET LARCH_PATH=C:\D\SPLINT\SHARE\SPLINT\LIB
> SET LCLIMPORTDIR=C:\D\SPLINT\SHARE\SPLINT\IMPORTS

That is superflous because that is the default place where splint
will search for its support files if the environment variables have
not been set.  I am assuming that C:\D is the root dir of your djgpp
installation tree where you have installed splint.  Again, if one of
LARCH_PATH and/or LCLIMPORTDIR are not set, splint will look at
/dev/env/DJDIR/share/splint/lib for LARCH_PATH and at
/dev/env/DJDIR/share/splint/imports for LCLIMPORTDIR.


> Do I have to explicitly declare a temp file?

No.  The handling of temparary files is a splint internal issue
with no user interaction.


> Temporary file for preprocessor output already exists.
> Trying to open c:\temp\c182000.c **cannot continue.

The error message indicates that splint is not capable open/read
or close some temporary file that it has already created or needs
to create.  If this happens splint can not operate at all.  It is
not possible to reproduce this error with the binary distribution
of splint that I have installed on my WinXP system, neither if
splint is ran with LFN support enabled or disabled.  I must
invest more time in this issue but I fear that this is not a
splint port bug but that something is very wrong with your
splint and/or djgpp installation.


Below I send you the output that the djgpp port of splint produces
on my WinXP system with "splint 1.c".


Regards,
Juan M. Guerrero






Splint 3.1.2 --- 07 Dec 2007

1.c:29:84: Comment starts inside comment
  A comment open sequence (/*) appears within a comment.  This usually
means an
  earlier comment was not closed. (Use -nestcomment to inhibit
warning)
1.c:17:15: Function parameter infile declared as manifest array (size
constant
              is meaningless)
  A formal parameter is declared as an array with size.  The size of
the array
  is ignored in this context, since the array formal parameter is
treated as a
  pointer. (Use -fixedformalarray to inhibit warning)
1.c:17:32: Function parameter outfile declared as manifest array (size
constant
              is meaningless)
1.c:17:50: Function parameter title declared as manifest array (size
constant
              is meaningless)
1.c: (in function lr2)
1.c:63:6: Dependent storage assigned to unqualified:
             fptr1 = fopen(infile, "rb")
  Dependent storage is transferred to a non-dependent reference. (Use
  -dependenttrans to inhibit warning)
1.c:64:6: Dependent storage assigned to unqualified:
             fptr2 = fopen(outfile, "a")
1.c:66:13: Test expression for while not boolean, type int: 1
  Test expression type is not boolean or int. (Use -predboolint to
inhibit
  warning)
1.c:69:39: Function fread expects arg 3 to be size_t gets long int:
              (long int)sizeof(double)
  To allow arbitrary integral types to match long unsigned, use
+longintegral.
1.c:69:61: Possibly null storage fptr1 passed as non-null param:
              fread (..., fptr1)
  A possibly null pointer is passed as a parameter corresponding to a
formal
  parameter with no /*@null@*/ annotation.  If NULL may be used for
this
  parameter, add a /*@null@*/ annotation to the function parameter
declaration.
  (Use -nullpass to inhibit warning)
   1.c:63:14: Storage fptr1 may become null
1.c:69:6: Assignment of size_t to long int:
             num_read = fread(&instring[0], 2, (long
int)sizeof(double), fptr1)
1.c:85:6: Assignment of long int to double:
             numerator = (count * accum_xy) - (accum_x * accum_y)
  To allow all numeric types to match, use +relaxtypes.
1.c:86:6: Assignment of long int to double:
             denominator = (count * accum_x_squared) - (accum_x *
accum_x)
1.c:91:6: Assignment of long int to double:
             numerator = (count * accum_xy) - (accum_x * accum_y)
1.c:92:25: Function sqrt expects arg 1 to be double gets long int:
              (count * accum_x_squared) - (accum_x * accum_x)
1.c:93:23: Function sqrt expects arg 1 to be double gets long int:
              (count * accum_y_squared) - (accum_y * accum_y)
1.c:93:18: Expression has undefined behavior (left operand uses errno,
modified
    by right operand): sqrt((count * accum_x_squared) - (accum_x *
accum_x)) *
    sqrt((count * accum_y_squared) - (accum_y * accum_y))
  Code has unspecified behavior. Order of evaluation of function
parameters or
  subexpressions is not defined, so if a value is used and modified in
  different places not separated by a sequence point constraining
evaluation
  order, then the result of the expression is unspecified. (Use -
evalorder to
  inhibit warning)
1.c:93:18: Expression has undefined behavior (left operand modifies
errno, used
    by right operand): sqrt((count * accum_x_squared) - (accum_x *
accum_x)) *
    sqrt((count * accum_y_squared) - (accum_y * accum_y))
1.c:103:14: Possibly null storage fptr2 passed as non-null param:
               fprintf (fptr2, ...)
   1.c:64:14: Storage fptr2 may become null
1.c:111:11: Possibly null storage fptr1 passed as non-null param:
               fclose (fptr1)
   1.c:63:14: Storage fptr1 may become null
1.c:111:4: Return value (type int) ignored: fclose(fptr1)
  Result returned by function call is not used. If this is intended,
can cast
  result to (void) to eliminate message. (Use -retvalint to inhibit
warning)
1.c:112:4: Return value (type int) ignored: fclose(fptr2)
1.c:11:7: Variable exported but not used outside 1: fptr1
  A declaration is exported, but not used outside this module.
Declaration can
  use static qualifier. (Use -exportlocal to inhibit warning)
1.c:11:15: Variable exported but not used outside 1: fptr2

Finished checking --- 23 code warnings

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019