Patchwork [2,of,4,warning-cleanup] base85: fix comparison of an int and a long

login
register
mail settings
Submitter Augie Fackler
Date Aug. 21, 2015, 6:36 p.m.
Message ID <f9f6192f329048b537dc.1440182170@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/10246/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 21, 2015, 6:36 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1440181782 14400
#      Fri Aug 21 14:29:42 2015 -0400
# Node ID f9f6192f329048b537dc2dc2af18f98479fe4388
# Parent  837bbc972e00aefa606bed43ee8232275b8f5e52
base85: fix comparison of an int and a long

Caught using

make local CFLAGS='-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter' CC=clang

Patch

diff --git a/mercurial/base85.c b/mercurial/base85.c
--- a/mercurial/base85.c
+++ b/mercurial/base85.c
@@ -21,7 +21,7 @@  static char b85dec[256];
 static void
 b85prep(void)
 {
-	int i;
+	unsigned i;
 
 	memset(b85dec, 0, sizeof(b85dec));
 	for (i = 0; i < sizeof(b85chars); i++)