s3: Fix some 64-bit warnings
authorVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 21:59:42 +0000 (14:59 -0700)
committerVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 22:01:29 +0000 (15:01 -0700)
source3/registry/reg_parse.c
source3/registry/reg_parse_internal.c

index 388eecdce8151cca8b54bc76f50571ba00ea5ab5..2fcdb41534bb3861f7a47f51539830eb90d46e2d 100644 (file)
@@ -587,7 +587,7 @@ int reg_parse_line(struct reg_parse* parser, const char* line)
                        DEBUG(0, ("value \"%s\" parse error"
                                  "at line: %i pos: %li : %s",
                                  cbuf_gets(parser->valname, 0), parser->linenum,
-                                 pos-line, pos));
+                                 (long int)(pos-line), pos));
                        return -3;
                }
        }
@@ -602,7 +602,7 @@ done:
 
        if (!srprs_skipws(&pos) || !srprs_eol(&pos, NULL)) {
                DEBUG(0, ("trailing garbage at line: %i pos: %li : %s\n",
-                         parser->linenum, pos-line, pos));
+                         parser->linenum, (long int)(pos-line), pos));
                return -1;
        }
        return 0;
@@ -789,7 +789,8 @@ handle_iconv_errno(int err, const char* obuf, size_t linenum,
        if (pos == *optr) {
                pos = MAX(obuf, *optr-60);
        }
-       DEBUG(0, ("Illegal multibyte sequence at line %lu: %s", linenum+1, pos));
+       DEBUG(0, ("Illegal multibyte sequence at line %lu: %s",
+                 (long unsigned)(linenum+1), pos));
 
        assert(ilen > 0);
        do {
index 3d3cf472f4b58f9a246a6ccc5d4d4014811532de..47346623020d1e7e36a11756a9819b6e472705b9 100644 (file)
@@ -79,7 +79,8 @@ convert:
                        reason="Illegal multibyte sequence";
                        break;
                }
-               DEBUG(0,("Conversion error: %s(%.80s) %li\n", reason, iptr, iptr-src));
+               DEBUG(0,("Conversion error: %s(%.80s) %li\n", reason, iptr,
+                        (long int)(iptr-src)));
                talloc_free(dst);
                return -1;
        }