From f3d3b3c8091ad4540c330c07662540440affb96e Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 25 Apr 2004 22:15:48 +0000 Subject: r355: Fix a bunch of compiler warnings in the registry code. (This used to be commit 0be7a866dc39e2d63c9c114d0f668287259e7c9e) --- source4/lib/registry/tools/regdiff.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'source4/lib/registry/tools/regdiff.c') 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 -- cgit