diff options
author | Tim Potter <tpot@samba.org> | 2004-04-25 22:15:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:34 -0500 |
commit | f3d3b3c8091ad4540c330c07662540440affb96e (patch) | |
tree | 39efb9209216232a3b1a7518327017f9f31df502 /source4/lib/registry/tools/regdiff.c | |
parent | 27ce4aa829ec1b4642a66fef2c31192778eef078 (diff) | |
download | samba-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/regdiff.c')
-rw-r--r-- | source4/lib/registry/tools/regdiff.c | 21 |
1 files changed, 9 insertions, 12 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 |