]> git.sur5r.net Git - i3/i3/blobdiff - i3-config-wizard/main.c
Fix 'gcc -Wextra -Wno-unused-parameter'.
[i3/i3] / i3-config-wizard / main.c
index 880b80ed8b4b84124c41325b9e733cd85856d57a..bdd012fc114a7c3ae08067d22657f9251f146176 100644 (file)
@@ -299,7 +299,7 @@ static char *rewrite_binding(const char *input) {
 
     /* The "<=" operator is intentional: We also handle the terminating 0-byte
      * explicitly by looking for an 'end' token. */
-    while ((walk - input) <= len) {
+    while ((size_t)(walk - input) <= len) {
         /* Skip whitespace before every token, newlines are relevant since they
          * separate configuration directives. */
         while ((*walk == ' ' || *walk == '\t') && *walk != '\0')
@@ -420,7 +420,7 @@ static char *rewrite_binding(const char *input) {
 
 
 /*
- * Having verboselog() and errorlog() is necessary when using libi3.
+ * Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
  *
  */
 void verboselog(char *fmt, ...) {
@@ -439,6 +439,9 @@ void errorlog(char *fmt, ...) {
     va_end(args);
 }
 
+void debuglog(char *fmt, ...) {
+}
+
 /*
  * This function resolves ~ in pathnames.
  * It may resolve wildcards in the first part of the path, but if no match
@@ -450,7 +453,7 @@ static char *resolve_tilde(const char *path) {
     char *head, *tail, *result;
 
     tail = strchr(path, '/');
-    head = strndup(path, tail ? tail - path : strlen(path));
+    head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));
 
     int res = glob(head, GLOB_TILDE, NULL, &globbuf);
     free(head);