summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-04-25 22:15:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:34 -0500
commitf3d3b3c8091ad4540c330c07662540440affb96e (patch)
tree39efb9209216232a3b1a7518327017f9f31df502 /source4/lib/registry/tools
parent27ce4aa829ec1b4642a66fef2c31192778eef078 (diff)
downloadsamba-f3d3b3c8091ad4540c330c07662540440affb96e.tar.gz
samba-f3d3b3c8091ad4540c330c07662540440affb96e.tar.bz2
samba-f3d3b3c8091ad4540c330c07662540440affb96e.zip
r355: Fix a bunch of compiler warnings in the registry code.
(This used to be commit 0be7a866dc39e2d63c9c114d0f668287259e7c9e)
Diffstat (limited to 'source4/lib/registry/tools')
-rw-r--r--source4/lib/registry/tools/regdiff.c21
-rw-r--r--source4/lib/registry/tools/regpatch.c2
-rw-r--r--source4/lib/registry/tools/regshell.c3
-rw-r--r--source4/lib/registry/tools/regtree.c1
4 files changed, 10 insertions, 17 deletions
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 94cdf8c8af..305a7a1e46 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -23,7 +23,7 @@
void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
{
- int i, numkeys1, numvals1, numvals2, numkeys2;
+ int i;
REG_KEY *t1,*t2;
REG_VAL *v1, *v2;
WERROR error1, error2;
@@ -33,12 +33,12 @@ void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
if(W_ERROR_EQUAL(error2, WERR_DEST_NOT_FOUND)) {
fprintf(out, "-%s\n", reg_key_get_path(t1)+1);
} else if(!W_ERROR_IS_OK(error2)) {
- DEBUG(0, ("Error occured while getting subkey by name: %d\n", error2));
+ DEBUG(0, ("Error occured while getting subkey by name: %d\n", W_ERROR_V(error2)));
}
}
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
- DEBUG(0, ("Error occured while getting subkey by index: %d\n", error1));
+ DEBUG(0, ("Error occured while getting subkey by index: %d\n", W_ERROR_V(error1)));
return;
}
@@ -47,13 +47,13 @@ void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
if(W_ERROR_EQUAL(error2, WERR_DEST_NOT_FOUND)) {
fprintf(out, "\n[%s]\n", reg_key_get_path(t1)+1);
} else if(!W_ERROR_IS_OK(error2)) {
- DEBUG(0, ("Error occured while getting subkey by name: %d\n", error2));
+ DEBUG(0, ("Error occured while getting subkey by name: %d\n", W_ERROR_V(error2)));
}
writediff(t2, t1, out);
}
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
- DEBUG(0, ("Error occured while getting subkey by index: %d\n", error1));
+ DEBUG(0, ("Error occured while getting subkey by index: %d\n", W_ERROR_V(error1)));
return;
}
@@ -65,12 +65,12 @@ void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
}
if(!W_ERROR_IS_OK(error2) && !W_ERROR_EQUAL(error2, WERR_DEST_NOT_FOUND)) {
- DEBUG(0, ("Error occured while getting value by name: %d\n", error2));
+ DEBUG(0, ("Error occured while getting value by name: %d\n", W_ERROR_V(error2)));
}
}
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
- DEBUG(0, ("Error occured while getting value by index: %d\n", error1));
+ DEBUG(0, ("Error occured while getting value by index: %d\n", W_ERROR_V(error1)));
return;
}
@@ -81,22 +81,20 @@ void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
} else if(W_ERROR_EQUAL(error2, WERR_DEST_NOT_FOUND)) {
fprintf(out, "\"%s\"=-\n", reg_val_name(v1));
} else {
- DEBUG(0, ("Error occured while getting value by name: %d\n", error2));
+ DEBUG(0, ("Error occured while getting value by name: %d\n", W_ERROR_V(error2)));
}
}
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
- DEBUG(0, ("Error occured while getting value by index: %d\n", error1));
+ DEBUG(0, ("Error occured while getting value by index: %d\n", W_ERROR_V(error1)));
return;
}
}
int main (int argc, char **argv)
{
- uint32 setparms, checkparms;
int opt;
poptContext pc;
- REG_KEY *root;
const char *backend1 = NULL, *backend2 = NULL;
const char *location2;
const char *credentials1= NULL, *credentials2 = NULL;
@@ -105,7 +103,6 @@ int main (int argc, char **argv)
REG_HANDLE *h2;
REG_KEY *root1 = NULL, *root2;
int from_null = 0;
- int fullpath = 0, no_values = 0;
WERROR error;
struct poptOption long_options[] = {
POPT_AUTOHELP
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index 9a51b0f7ff..e632edaa49 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -754,7 +754,6 @@ int nt_apply_reg_command_file(REG_KEY *root, const char *cmd_file_name)
int main (int argc, char **argv)
{
- uint32 setparms, checkparms;
int opt;
poptContext pc;
REG_KEY *root;
@@ -763,7 +762,6 @@ int main (int argc, char **argv)
const char *patch;
const char *backend = "dir";
REG_HANDLE *h;
- int fullpath = 0, no_values = 0;
WERROR error;
struct poptOption long_options[] = {
POPT_AUTOHELP
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 18399b5bda..8ee2a65d06 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -58,7 +58,7 @@ static REG_KEY *cmd_ck(REG_KEY *cur, int argc, char **argv)
static REG_KEY *cmd_ls(REG_KEY *cur, int argc, char **argv)
{
- int i, num;
+ int i;
WERROR error;
REG_VAL *value;
REG_KEY *sub;
@@ -198,7 +198,6 @@ REG_KEY *process_cmd(REG_KEY *k, char *line)
int main (int argc, char **argv)
{
- uint32 setparms, checkparms;
int opt;
char *backend = "dir";
char *credentials = NULL;
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 3e74db2557..94018bdc5c 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -60,7 +60,6 @@ void print_tree(int l, REG_KEY *p, int fullpath, int novals)
int main (int argc, char **argv)
{
- uint32 setparms, checkparms;
int opt;
char *backend = "dir", *credentials = NULL;
poptContext pc;