summaryrefslogtreecommitdiff
path: root/dhcpctl
diff options
context:
space:
mode:
authorShane Kerr <shane@isc.org>2007-07-13 06:43:43 +0000
committerShane Kerr <shane@isc.org>2007-07-13 06:43:43 +0000
commit28868515f6cb8ec3a78773391945ac89d555d65d (patch)
tree108b4801b3d3d019278281eb276288271480afe3 /dhcpctl
parent763cba6b918975315a644646137fec48e4953058 (diff)
downloadisc-dhcp-28868515f6cb8ec3a78773391945ac89d555d65d.tar.gz
Code cleanup to remove warnings from "gcc -Wall".
See RT ticket #16988 for more.
Diffstat (limited to 'dhcpctl')
-rw-r--r--dhcpctl/callback.c8
-rw-r--r--dhcpctl/cltest.c10
-rw-r--r--dhcpctl/dhcpctl.c11
-rw-r--r--dhcpctl/omshell.c10
-rw-r--r--dhcpctl/remote.c7
5 files changed, 3 insertions, 43 deletions
diff --git a/dhcpctl/callback.c b/dhcpctl/callback.c
index 9d94bf3c..35c947e3 100644
--- a/dhcpctl/callback.c
+++ b/dhcpctl/callback.c
@@ -32,11 +32,6 @@
* ``http://www.nominum.com''.
*/
-#ifndef lint
-static char copyright[] =
-"$Id: callback.c,v 1.8 2007/05/19 19:16:24 dhankins Exp $ Copyright (c) 2004,2007 Internet Systems Consortium. All rights reserved.\n";
-#endif /* not lint */
-
#include "dhcpd.h"
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
@@ -60,7 +55,6 @@ dhcpctl_status dhcpctl_set_callback (dhcpctl_handle h, void *data,
{
dhcpctl_callback_object_t *callback;
omapi_object_t *inner;
- isc_result_t status;
callback = dmalloc (sizeof *callback, MDL);
if (!callback)
@@ -163,8 +157,6 @@ isc_result_t dhcpctl_callback_stuff_values (omapi_object_t *c,
omapi_object_t *id,
omapi_object_t *p)
{
- int i;
-
if (p -> type != dhcpctl_callback_type)
return ISC_R_INVALIDARG;
diff --git a/dhcpctl/cltest.c b/dhcpctl/cltest.c
index 561f6a0f..d7ecfe72 100644
--- a/dhcpctl/cltest.c
+++ b/dhcpctl/cltest.c
@@ -28,11 +28,6 @@
* by Brian Murrell.
*/
-#ifndef lint
-static char ocopyright[] =
-"$Id: cltest.c,v 1.13 2005/03/17 20:15:03 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
-#endif /* not lint */
-
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@@ -60,9 +55,8 @@ int main (argc, argv)
isc_result_t status, waitstatus;
dhcpctl_handle authenticator;
dhcpctl_handle connection;
- dhcpctl_handle host_handle, group_handle, interface_handle;
- dhcpctl_data_string cid;
- dhcpctl_data_string result, groupname, identifier;
+ dhcpctl_handle interface_handle;
+ dhcpctl_data_string result;
int i;
int mode = undefined;
const char *interface = 0;
diff --git a/dhcpctl/dhcpctl.c b/dhcpctl/dhcpctl.c
index 8e1d750f..891f965b 100644
--- a/dhcpctl/dhcpctl.c
+++ b/dhcpctl/dhcpctl.c
@@ -32,11 +32,6 @@
* ``http://www.nominum.com''.
*/
-#ifndef lint
-static char copyright[] =
-"$Id: dhcpctl.c,v 1.27 2007/05/19 19:16:24 dhankins Exp $ Copyright (c) 2004,2007 Internet Systems Consortium. All rights reserved.\n";
-#endif /* not lint */
-
#include "dhcpd.h"
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
@@ -102,7 +97,6 @@ dhcpctl_status dhcpctl_connect (dhcpctl_handle *connection,
dhcpctl_handle authinfo)
{
isc_result_t status;
- dhcpctl_status waitstatus;
status = omapi_generic_new (connection, MDL);
if (status != ISC_R_SUCCESS) {
@@ -172,7 +166,6 @@ dhcpctl_status dhcpctl_get_value (dhcpctl_data_string *result,
{
isc_result_t status;
omapi_value_t *tv = (omapi_value_t *)0;
- omapi_data_string_t *value = (omapi_data_string_t *)0;
unsigned len;
int ip;
@@ -264,7 +257,6 @@ dhcpctl_status dhcpctl_set_value (dhcpctl_handle h, dhcpctl_data_string value,
isc_result_t status;
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
omapi_data_string_t *name = (omapi_data_string_t *)0;
- int len;
status = omapi_data_string_new (&name, strlen (value_name), MDL);
if (status != ISC_R_SUCCESS)
@@ -298,7 +290,6 @@ dhcpctl_status dhcpctl_set_string_value (dhcpctl_handle h, const char *value,
isc_result_t status;
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
omapi_data_string_t *name = (omapi_data_string_t *)0;
- int len;
status = omapi_data_string_new (&name, strlen (value_name), MDL);
if (status != ISC_R_SUCCESS)
@@ -387,7 +378,6 @@ dhcpctl_status dhcpctl_set_boolean_value (dhcpctl_handle h, int value,
isc_result_t status;
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
omapi_data_string_t *name = (omapi_data_string_t *)0;
- int len;
status = omapi_data_string_new (&name, strlen (value_name), MDL);
if (status != ISC_R_SUCCESS)
@@ -417,7 +407,6 @@ dhcpctl_status dhcpctl_set_int_value (dhcpctl_handle h, int value,
isc_result_t status;
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
omapi_data_string_t *name = (omapi_data_string_t *)0;
- int len;
status = omapi_data_string_new (&name, strlen (value_name), MDL);
if (status != ISC_R_SUCCESS)
diff --git a/dhcpctl/omshell.c b/dhcpctl/omshell.c
index 63286eb5..eac61365 100644
--- a/dhcpctl/omshell.c
+++ b/dhcpctl/omshell.c
@@ -32,11 +32,6 @@
* ``http://www.nominum.com''.
*/
-#ifndef lint
-static char copyright[] =
-"$Id: omshell.c,v 1.16 2007/06/08 14:58:20 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n";
-#endif /* not lint */
-
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@@ -89,11 +84,9 @@ main(int argc, char **argv) {
dhcpctl_handle connection;
dhcpctl_handle authenticator;
dhcpctl_handle oh;
- dhcpctl_data_string cid, ip_addr;
- dhcpctl_data_string result, groupname, identifier;
struct data_string secret;
const char *name = 0, *algorithm = "hmac-md5";
- int i, j;
+ int i;
int port = 7911;
const char *server = "127.0.0.1";
struct parse *cfile;
@@ -483,7 +476,6 @@ main(int argc, char **argv) {
val = buf;
do {
int intval = atoi (val);
- dotiszero:
if (intval > 255) {
parse_warn (cfile,
"dotted octet > 255: %s",
diff --git a/dhcpctl/remote.c b/dhcpctl/remote.c
index 945770fc..29af9c72 100644
--- a/dhcpctl/remote.c
+++ b/dhcpctl/remote.c
@@ -32,11 +32,6 @@
* ``http://www.nominum.com''.
*/
-#ifndef lint
-static char copyright[] =
-"$Id: remote.c,v 1.16 2007/05/19 19:16:24 dhankins Exp $ Copyright (c) 2004,2007 Internet Systems Consortium. All rights reserved.\n";
-#endif /* not lint */
-
#include "dhcpd.h"
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
@@ -355,8 +350,6 @@ isc_result_t dhcpctl_remote_stuff_values (omapi_object_t *c,
omapi_object_t *id,
omapi_object_t *p)
{
- int i;
-
if (p -> type != dhcpctl_remote_type)
return ISC_R_INVALIDARG;