fixes some char type mismatch warnings

Sat, 02 Jun 2018 16:25:01 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 02 Jun 2018 16:25:01 +0200
changeset 405
6b85d745e402
parent 404
5c08b8e14df8
child 406
36333e8a9411

fixes some char type mismatch warnings

dav/config.c file | annotate | diff | comparison | revisions
dav/sync.c file | annotate | diff | comparison | revisions
--- a/dav/config.c	Fri Jun 01 19:08:46 2018 +0200
+++ b/dav/config.c	Sat Jun 02 16:25:01 2018 +0200
@@ -702,22 +702,22 @@
         xmlNodePtr prev = matchedRepoNode->prev;
         xmlNodePtr next = matchedRepoNode->next;
         if(prev && prev->type == XML_TEXT_NODE) {
-            sstr_t content = sstr(prev->content);
+            sstr_t content = sstr((char*)prev->content);
             sstr_t lf = sstrrchr(content, '\n');
             if(lf.length > 0) {
                 *lf.ptr = '\0';
                 char* newcontent = sstrdup(content).ptr;
-                xmlNodeSetContent(prev, newcontent);
+                xmlNodeSetContent(prev, (xmlChar*)newcontent);
                 free(newcontent);
             }
         }
         if(next && next->type == XML_TEXT_NODE) {
-            sstr_t lf = sstrchr(sstr(next->content), '\n');
+            sstr_t lf = sstrchr(sstr((char*)next->content), '\n');
             if(lf.length > 0) {
                 char* newcontent = malloc(lf.length);
                 memcpy(newcontent, lf.ptr+1, lf.length-1);
                 newcontent[lf.length-1] = '\0';
-                xmlNodeSetContent(next, newcontent);
+                xmlNodeSetContent(next, (xmlChar*)newcontent);
                 free(newcontent);
             }
         }
--- a/dav/sync.c	Fri Jun 01 19:08:46 2018 +0200
+++ b/dav/sync.c	Sat Jun 02 16:25:01 2018 +0200
@@ -169,9 +169,9 @@
     fprintf(stderr, "Usage: %s command [options] arguments...\n\n", cmd);
     
     fprintf(stderr, "Commands:\n");
-    fprintf(stderr, "        pull [-cld] [-t <tags>] <directory>\n");
-    fprintf(stderr, "        push [-cld] [-t <tags>] <directory>\n");
-    fprintf(stderr, "        archive [-cld] <directory>\n");
+    fprintf(stderr, "        pull [-cldr] [-t <tags>] <directory>\n");
+    fprintf(stderr, "        push [-cldr] [-t <tags>] <directory>\n");
+    fprintf(stderr, "        archive [-cld] [-t <tags>] <directory>\n");
     fprintf(stderr, "        resolve-conflicts <directory>\n");
     fprintf(stderr, "        delete-conflicts <directory>\n");
     fprintf(stderr, "        trash-info <directory>\n");

mercurial