Bug 929466: Cast '0' + known-small-uint32_t to type "char" in comparison within mar.c, to fix sign-compare build warning. r=bbondy
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 23 Oct 2013 08:22:32 +0200
changeset 165572 f87879d36aefa4814edc9dc158cb7200d31d43e5
parent 165571 9b5e4b85bf1e0de69eddf96393b855242878b827
child 165585 c0e6e76aafedbdc3852fc3fc114b8f57b7ddf851
child 165652 8e1b8db8090668978d09aead06d454d07d095f58
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs929466
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 929466: Cast '0' + known-small-uint32_t to type "char" in comparison within mar.c, to fix sign-compare build warning. r=bbondy
modules/libmar/tool/mar.c
--- a/modules/libmar/tool/mar.c
+++ b/modules/libmar/tool/mar.c
@@ -149,17 +149,17 @@ int main(int argc, char **argv) {
       argc -= 2;
     } 
 #if defined(XP_WIN) && !defined(MAR_NSS) && !defined(NO_SIGN_VERIFY)
     /* -D DERFilePath, also matches -D[index] DERFilePath
        We allow an index for verifying to be symmetric
        with the import and export command line arguments. */
     else if (argv[1][0] == '-' &&
              argv[1][1] == 'D' &&
-             (argv[1][2] == '0' + certCount || argv[1][2] == '\0')) {
+             (argv[1][2] == (char)('0' + certCount) || argv[1][2] == '\0')) {
       if (certCount >= MAX_SIGNATURES) {
         print_usage();
         return -1;
       }
       DERFilePaths[certCount++] = argv[2];
       argv += 2;
       argc -= 2;
     }