[5669] in Athena Bugs
Vax 7.1D Inconsistancies in moira lint libraries.
daemon@ATHENA.MIT.EDU (epeisach@ATHENA.MIT.EDU)
Sun Aug 5 11:45:33 1990
From: epeisach@ATHENA.MIT.EDU
Date: Sun, 5 Aug 90 11:44:51 -0400
To: bugs@ATHENA.MIT.EDU
Cc: bug-moira@ATHENA.MIT.EDU
I tried:
lint -lmoira -lmrgdb
and received the following comlaints:
strcpy value declared inconsistently llib-lc(361) :: llib-lmoira:mr_auth.c(49)
strncpy value declared inconsistently llib-lc(367) :: llib-lmoira:mr_ops.c(77)
malloc value declared inconsistently llib-lc(287) :: llib-lmoira:sq.c(51)
malloc value declared inconsistently llib-lc(287) :: llib-lmoira:hash.c(107)
time value declared inconsistently llib-lc(382) :: llib-lmoira:critical.c(57)
free value declared inconsistently llib-lc(229) :: llib-lgdb:gdb_struct.c(110)
start_accepting_client value declared inconsistently llib-lgdb:gdb_ops.c(723) :: llib-lgdb:gdb_fserv.c(133)
_res used( llib-lmoira:fixhost.c(81) ), but not defined
whoami used( llib-lmoira:critical.c(65) ), but not defined
The following will fix all the above problems, except the whoami not
being defined as it is expected that whoami comes from the client.
The _res is buried in the C library and not in the lint structres so is
ifdef'ed lint.
I don't really like the fix for gdb_struct.c as it would appear to me
that lint should handle it properly. Perhaps an #ifndef lint instead?
-------------------------------- Under rpc ----------------------
RCS file: RCS/critical.c,v
retrieving revision 1.1
diff -c -r1.1 critical.c
*** /tmp/,RCSt1006186 Sun Aug 5 11:42:48 1990
--- critical.c Sun Aug 5 11:09:37 1990
***************
*** 51,57 ****
/* Log message to critical file */
if ((crit = fopen(CRITERRLOG, "a")) != (FILE *)NULL)
{
! long t;
char *time_s;
time(&t);
--- 51,57 ----
/* Log message to critical file */
if ((crit = fopen(CRITERRLOG, "a")) != (FILE *)NULL)
{
! long t, time();
char *time_s;
time(&t);
===================================================================
RCS file: RCS/fixhost.c,v
retrieving revision 1.1
diff -c -r1.1 fixhost.c
*** /tmp/,RCSt1006186 Sun Aug 5 11:42:49 1990
--- fixhost.c Sun Aug 5 11:19:15 1990
***************
*** 31,36 ****
--- 31,40 ----
extern char *realloc();
extern char *strsave();
+ #ifdef lint
+ struct state _res;
+ #endif
+
/*
* Canonicalize hostname:
* if it is in double-quotes, then strip the quotes and return the name.
===================================================================
RCS file: RCS/hash.c,v
retrieving revision 1.1
diff -c -r1.1 hash.c
*** /tmp/,RCSt1006186 Sun Aug 5 11:42:50 1990
--- hash.c Sun Aug 5 11:00:10 1990
***************
*** 11,16 ****
--- 11,17 ----
#include <ctype.h>
#include <moira.h>
+ extern char *malloc();
#define NULL 0
#define hash_func(h, key) (key >= 0 ? (key % h->size) : (-key % h->size))
===================================================================
RCS file: RCS/mr_auth.c,v
retrieving revision 1.1
diff -c -r1.1 mr_auth.c
*** /tmp/,RCSt1006186 Sun Aug 5 11:42:50 1990
--- mr_auth.c Sun Aug 5 10:58:21 1990
***************
*** 20,25 ****
--- 20,26 ----
#include <ctype.h>
#include <krb.h>
#include <krb_et.h>
+ #include <strings.h>
/* Authenticate this client with the MR server. prog is the name of the
* client program, and will be recorded in the database.
===================================================================
RCS file: RCS/mr_ops.c,v
retrieving revision 1.1
diff -c -r1.1 mr_ops.c
*** /tmp/,RCSt1006186 Sun Aug 5 11:42:51 1990
--- mr_ops.c Sun Aug 5 10:58:49 1990
***************
*** 19,25 ****
#include <mit-copyright.h>
#include "mr_private.h"
!
/* Invoke a DCM update. */
--- 19,25 ----
#include <mit-copyright.h>
#include "mr_private.h"
! #include <strings.h>
/* Invoke a DCM update. */
===================================================================
RCS file: RCS/sq.c,v
retrieving revision 1.1
diff -c -r1.1 sq.c
*** /tmp/,RCSt1006186 Sun Aug 5 11:42:52 1990
--- sq.c Sun Aug 5 10:59:27 1990
***************
*** 10,15 ****
--- 10,17 ----
#include <mit-copyright.h>
#include <moira.h>
+ extern char *malloc();
+
struct save_queue *
sq_create()
{
---------------------------- Under gdb -------------------------------
RCS file: RCS/gdb_fserv.c,v
retrieving revision 1.1
diff -c -r1.1 gdb_fserv.c
*** /tmp/,RCSt1006177 Sun Aug 5 11:42:42 1990
--- gdb_fserv.c Sun Aug 5 11:36:30 1990
***************
*** 97,102 ****
--- 97,103 ----
int (*validate)();
{
+ void start_accepting_client();
CONNECTION incoming; /* listen for incoming */
/* children here */
CONNECTION client = NULL; /* connection to client */
===================================================================
RCS file: RCS/gdb_struct.c,v
retrieving revision 1.1
diff -c -r1.1 gdb_struct.c
*** /tmp/,RCSt1006177 Sun Aug 5 11:42:45 1990
--- gdb_struct.c Sun Aug 5 11:38:57 1990
***************
*** 61,67 ****
--- 61,69 ----
#include "gdb.h"
extern char *malloc();
+ #if 0
extern void free();
+ #endif
/************************************************************************/
/*