$Id: TODO-splint,v 1.9 2003/05/26 19:57:01 carstenklapp Exp $

make splint
     using options: +charint +ignoresigns +charindex +posixlib -skipposixheaders -exportlocal +boolint +charintliteral -exitarg -formatconst

Splint 3.0.1.6 --- 15 Nov 2002

options.c: (in function process_option)
options.c:154:21: Parameter 1 (cfg_authkey) to function strncpy is declared
    unique but may be aliased externally by parameter 2 (value)
  A unique or only parameter may be aliased by some other parameter or visible
  global. (Use -mayaliasunique to inhibit warning)
options.c:231:17: Parameter 1 (cfg_upserver) to function strncpy is declared
    unique but may be aliased externally by parameter 2 (value)
options.c:235:17: Parameter 1 (cfg_proxyserver) to function strncpy is declared
    unique but may be aliased externally by parameter 2 (value)
options.c:251:17: Parameter 1 (cfg_proxyuser) to function strncpy is declared
    unique but may be aliased externally by parameter 2 (value)
options.c:256:17: Parameter 1 (cfg_proxypass) to function strncpy is declared
    unique but may be aliased externally by parameter 2 (value)
options.c:261:17: Parameter 1 (cfg_pidfile) to function strncpy is declared
    unique but may be aliased externally by parameter 2 (value)
options.c: (in function read_config)
options.c:489:13: Test expression for if is assignment expression:
                     fp = fopen("upclient.conf", "r")
  The condition test is an assignment expression. Probably, you mean to use ==
  instead of =. If an assignment is intended, add an extra parentheses nesting
  (e.g., if ((a = b)) ...) to suppress this message. (Use -predassign to
  inhibit warning)
options.c:495:18: Test expression for if is assignment expression:
                     fp = fopen("/etc/upclient.conf", "r")
options.c:501:18: Test expression for if is assignment expression:
                     fp = fopen("/usr/local/etc/upclient.conf", "r")
options.c:508:18: Test expression for if is assignment expression:
                     fp = fopen("/usr/pkg/etc/upclient.conf", "r")
options.c:530:9: Return value (type char *) ignored: fgets(line, 1024...
  Result returned by function call is not used. If this is intended, can cast
  result to (void) to eliminate message. (Use -retvalother to inhibit warning)
options.c:542:36: Passed storage key not completely defined (*key is
                     undefined): parseline (..., key, ...)
  Storage derivable from a parameter, return value or global is not defined.
  Use /*@out@*/ to denote passed or returned storage which need not be defined.
  (Use -compdef to inhibit warning)
options.c:542:41: Passed storage value not completely defined (*value is
                     undefined): parseline (..., value)
uplog.c: (in function uplog)
uplog.c:57:5: Use vsnprintf instead: vsprintf
  Use of function that may lead to buffer overflow. (Use -bufferoverflowhigh to
  inhibit warning)
uplog.c:57:5: Return value (type int) ignored: vsprintf(formatt...
  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)
transmit.c: (in function udp_post)
transmit.c:95:16: Observer storage reachable from unqualified return value
  Observer storage is transferred to a non-observer reference. (Use
  -observertrans to inhibit warning)
transmit.c:95:16: Observer storage returned without qualification:
                     strerror(errno)
transmit.c:109:20: Observer storage returned without qualification:
                      ("002 ERROR: Can't resolve hostname of uptime server")
   transmit.c:109:21: Storage becomes observer
transmit.c:125:16: Observer storage returned without qualification:
                      ("003 ERROR: Can't connect to Uptime Server via UDP")
   transmit.c:125:17: Storage becomes observer
transmit.c:125:70: Fresh storage he not released before return
  A memory leak has been detected. Storage allocated locally is not released
  before the last reference to it is lost. (Use -mustfreefresh to inhibit
  warning)
   transmit.c:105:9: Fresh storage he allocated
transmit.c:132:16: Observer storage returned without qualification:
                      ("004 ERROR: Can't send data via UDP")
   transmit.c:132:17: Storage becomes observer
transmit.c:132:55: Fresh storage he not released before return
   transmit.c:105:9: Fresh storage he allocated
transmit.c:138:12: Observer storage returned without qualification: ("000 OK")
   transmit.c:138:13: Storage becomes observer
transmit.c:138:23: Fresh storage he not released before return
   transmit.c:105:9: Fresh storage he allocated
transmit.c: (in function www_post)
transmit.c:163:16: Observer storage returned without qualification:
                      ("005 ERROR: Can't create HTTP socket")
   transmit.c:163:17: Storage becomes observer
transmit.c:179:20: Observer storage returned without qualification:
                      ("006 ERROR: Can't resolve hostname of proxyserver")
   transmit.c:179:21: Storage becomes observer
transmit.c:188:9: Only storage assigned to unqualified static:
                     s2 = base64_encode(auth)
  The only reference to this storage is transferred to another reference (e.g.,
  by returning it) that does not have the only annotation. This may lead to a
  memory leak, since the new reference is not necessarily released. (Use
  -onlytrans to inhibit warning)
transmit.c:201:16: Observer storage returned without qualification:
                      ("007 ERROR: Can't connect to Proxy Server via HTTP")
   transmit.c:201:17: Storage becomes observer
transmit.c:201:70: Fresh storage he not released before return
   transmit.c:175:9: Fresh storage he allocated
transmit.c:212:14: Unqualified static storage s2 passed as only param:
                      free (s2)
  Static storage is transferred in an inconsistent way. (Use -statictrans to
  inhibit warning)
transmit.c:224:16: Observer storage returned without qualification:
                      ("008 ERROR: Can't send HTTP header")
   transmit.c:224:17: Storage becomes observer
transmit.c:224:54: Fresh storage he not released before return
   transmit.c:175:9: Fresh storage he allocated
transmit.c:231:16: Observer storage returned without qualification:
                      ("009 ERROR: Can't send data via HTTP")
   transmit.c:231:17: Storage becomes observer
transmit.c:231:56: Fresh storage he not released before return
   transmit.c:175:9: Fresh storage he allocated
transmit.c:234:27: Passed storage rec not completely defined (*rec is
                      undefined): socket_read (..., rec, ...)
transmit.c:238:16: Observer storage returned without qualification:
                      ("010 ERROR: Can't receive data via HTTP")
   transmit.c:238:17: Storage becomes observer
transmit.c:238:59: Fresh storage he not released before return
   transmit.c:175:9: Fresh storage he allocated
transmit.c:245:16: Stack-allocated storage s reachable from return value: s + 4
  A stack reference is pointed to by an external reference when the function
  returns. The stack-allocated storage is destroyed after the call, leaving a
  dangling reference. (Use -stackref to inhibit warning)
   transmit.c:241:5: Storage s becomes stack
transmit.c:245:22: Fresh storage he not released before return
   transmit.c:175:9: Fresh storage he allocated
transmit.c:252:12: Observer storage returned without qualification:
                      ("011 ERROR: No HTTP result received")
   transmit.c:252:13: Storage becomes observer
transmit.c:252:51: Fresh storage he not released before return
   transmit.c:175:9: Fresh storage he allocated
transmit.c: (in function send_update)
transmit.c:362:21: Function call may modify observer *sentmsg: sentmsg
  Storage declared with observer is possibly modified. Observer storage may not
  be modified. (Use -modobserver to inhibit warning)
transmit.c:364:21: Function call may modify observer *sentmsg: sentmsg
transmit.c:367:25: Function call may modify observer *sentmsg: sentmsg
transmit.c:369:25: Function call may modify observer *sentmsg: sentmsg
transmit.c:371:25: Function call may modify observer *sentmsg: sentmsg
transmit.c:374:21: Function call may modify observer *sentmsg: sentmsg
transmit.c:398:2: Fresh storage ret not released before return
   transmit.c:356:9: Fresh storage ret allocated
upclient.c: (in function daemon_timertick)
upclient.c:167:38: Parameter signum not used
  A function parameter is not used in the body of the function. If the argument
  is needed for type compatibility or future plans, use /*@unused@*/ in the
  argument declaration. (Use -paramuse to inhibit warning)
upclient.c: (in function parent_check_oldPidfile_exists)
upclient.c:191:31: Format argument 1 to fscanf (%d) expects int * gets pid_t *:
                      &pid
  To allow arbitrary integral types to match any integral type, use
  +matchanyintegral.
   upclient.c:191:27: Corresponding format code
upclient.c: (in function parent_write_pidfile)
upclient.c:269:9: Return value (type int) ignored: kill(pid, SIGKILL)
upclient.c: (in function daemon_hup_handler)
upclient.c:340:9: Unrecognized identifier: setitimer
  Identifier used in code has not been declared. (Use -unrecog to inhibit
  warning)
upclient.c:340:19: Unrecognized identifier: ITIMER_REAL
upclient.c: (in function parent_end_message)
upclient.c:398:16: Variable message shadows outer declaration
  An outer declaration is shadowed by the local declaration. (Use -shadow to
  inhibit warning)
   upclient.c:392:12: Previous definition of message: char [1024]
upclient.c: (in function daemon_startTimer)
upclient.c:467:5: Return value (type int) ignored: sigemptyset(&sa....
upclient.c:498:2: Only storage sa.sa_mask (type sigset_t) derived from variable
                     declared in this scope is not released (memory leak)
  A storage leak due to incomplete deallocation of a structure or deep pointer
  is suspected. Unshared storage that is reachable from a reference that is
  being deallocated has not yet been deallocated. Splint assumes when an object
  is passed as an out only void pointer that the outer object will be
  deallocated, but the inner objects will not. (Use -compdestroy to inhibit
  warning)
upclient.c: (in function daemon_setup_signalHandlers)
upclient.c:531:27: Null storage passed as non-null param:
                      sigaction (..., (struct sigaction *)0, ...)
  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)
upclient.c:531:9: Return value (type int) ignored: sigaction(SIGHUP...
upclient.c:538:9: Return value (type int) ignored: sigaction(SIGHUP...
upclient.c:539:6: Only storage sa.sa_mask (type sigset_t) derived from variable
                     declared in this scope is not released (memory leak)
upclient.c: (in function main)
upclient.c:780:12: Unreachable code: return 1
  This code will never be reached on any possible execution. (Use -unreachable
  to inhibit warning)

Finished checking --- 61 code warnings
