]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
get rid of some compiler warnings
authorwessels <>
Fri, 21 Nov 1997 10:42:37 +0000 (10:42 +0000)
committerwessels <>
Fri, 21 Nov 1997 10:42:37 +0000 (10:42 +0000)
include/snmp.h
include/snmp_api.h
snmplib/Makefile.in
snmplib/mib.c
snmplib/parse.c

index fc43bd618b49db0a3abf1b5487076e9375f7ab24..a5f9e06bb0d658716c037e1c347b64550cf99a86 100644 (file)
@@ -3,7 +3,7 @@
  *
  *
  */
-/***********************************************************
+/*
        Copyright 1988, 1989 by Carnegie Mellon University
 
                       All Rights Reserved
@@ -23,7 +23,7 @@ ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 SOFTWARE.
-******************************************************************/
+*/
 
 #ifndef SNMP_H
 #define SNMP_H
@@ -121,7 +121,6 @@ typedef struct _conf_if_list {
 
 extern conf_if_list *if_list;
 
-#ifndef SQUID_SNMP
 /*extern void init_snmp(); */
 
 extern int read_objid(char *input,
@@ -129,19 +128,12 @@ extern int read_objid(char *input,
     int *out_len);
 
 extern void sprint_objid(char *buf, oid * id, int idlen);
-extern void print_objid(oid * id,
-    int idlen);
-void snmp_add_null_var(struct snmp_pdu *,
-    oid *,
-    int);
-extern void xdump(u_char * cp,
-    int length,
-    char *prefix);
-
+extern void print_objid(oid * id, int idlen);
+void snmp_add_null_var(struct snmp_pdu *, oid *, int);
+extern void xdump(u_char * cp, int length, char *prefix);
 extern void snmp_synch_setup(struct snmp_session *session);
-
 extern int snmp_synch_response(struct snmp_session *ss,
     struct snmp_pdu *pdu,
     struct snmp_pdu **response);
-#endif
+
 #endif
index c8bbbd8ca850913a74fc46a9da7ce89313135529..292011573f2bd8fd01e0d72a3d08185e41f9a666 100644 (file)
@@ -179,7 +179,6 @@ struct variable_list {
     int val_len;
 };
 
-#ifndef SQUID_SNMP
 /*
  * struct snmp_session *snmp_open(session)
  *      struct snmp_session *session;
@@ -315,7 +314,6 @@ void snmp_timeout _ANSI_ARGS_((void));
  * Any data in the pdu must be copied because it will be freed elsewhere.
  * Operations are defined below:
  */
-#endif
 
 #define RECEIVED_MESSAGE   1
 #define TIMED_OUT         2
index 498fe40f78856650e1d0dc4209f43db354fd5511..4c51492548eb9fa8c215202467eee0f8d2fb38a1 100644 (file)
@@ -21,7 +21,7 @@ OBJS= snmp_client.o snmp.o snmp_auth.o asn1.o mib.o parse.o snmp_api.o \
 
 CC= @CC@
 FLAGS= 
-DEFS= -DBSD4_3 -DSQUID_SNMP
+DEFS= -DBSD4_3 -DSQUID_SNMP=1
 INCLUDE= -I../include -I./../include -I../src -I./../src
 MIBDEFS= -DMIBFILEPATH=\"$(prefix)/lib\"
 # CFLAGS=-O -DDEBUG -DBSD4_3
index 11e168f35083a98cc7cb65d7e2345add0190471c..16da7854495ce3f1abe142678947eb8b606af95c 100644 (file)
@@ -904,14 +904,10 @@ parse_subtree(subtree, input, output, out_len)
 }
 
 void
-sprint_objid(buf, objid, objidlen)
-     char *buf;
-     oid *objid;
-     int objidlen;             /* number of subidentifiers */
+sprint_objid(char *buf, oid * objid, int objidlen)
 {
     char tempbuf[2048], *cp;
     struct tree *subtree = Mib;
-
     *tempbuf = '.';            /* this is a fully qualified name */
     get_symbol(objid, objidlen, subtree, tempbuf + 1);
     if (Suffix) {
@@ -929,7 +925,6 @@ sprint_objid(buf, objid, objidlen)
        cp++;
        if (cp < tempbuf)
            cp = tempbuf;
-
     } else {
        cp = tempbuf;
        if ((strlen(tempbuf) > strlen((char *) RFC1213_MIB_text))
@@ -961,7 +956,6 @@ sprint_objid(buf, objid, objidlen)
     strcpy(buf, cp);
 }
 
-
 void
 print_objid(objid, objidlen)
      oid *objid;
index a01870f287cb8f948be1cf15b1ba6d76eb83a5a5..b7545cc3480e2ac834374abdb1a9f6ccb68d4ec0 100644 (file)
@@ -19,18 +19,29 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 SOFTWARE.
 ******************************************************************/
-/*
- * parse.c
- */
+
+#include "config.h"
+
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if HAVE_CTYPE_H
 #include <ctype.h>
+#endif
+#if HAVE_SYS_TYPES_H
 #include <sys/types.h>
-#ifdef linux
+#endif
+#if HAVE_STDLIB>H
 #include <stdlib.h>
+#endif
+#if HAVE_STRING_H
 #include <string.h>
 #endif
+#if HAVE_GNUMALLOC_H
+#include <gnumalloc.h>
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
 #include <malloc.h>
-
+#endif
 
 #include "parse.h"
 
@@ -260,10 +271,6 @@ static char *
 Malloc(num)
      unsigned num;
 {
-#ifndef linux
-    char *calloc();
-#endif
-
     /* this is to fix (what seems to be) a problem with the IBM RT C
      * library malloc */
     if (num < 16)