]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'refs/heads/t/format-signedness'
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 28 Dec 2016 19:38:34 +0000 (20:38 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 28 Dec 2016 19:42:12 +0000 (20:42 +0100)
This series fixes all warnings produced by compiling with
-Wformat-signedness and adds the flag to CFLAGS if the compiler
supports it.

* refs/heads/t/format-signedness (cooking for ~2 weeks):
  gcrypt: Fix a few format-signedness issues.
  Compile with -Wformat-signedness if possible.
  Fix signedness issues in format strings.

13 files changed:
1  2 
NEWS.md
aac_afh.c
aac_common.c
aacdec_filter.c
afs.c
aft.c
crypt_common.c
fade.c
gcrypt.c
play.c
server.c
wma_common.c
wmadec_filter.c

diff --cc NEWS.md
index 10e78ca542c556ad5406f7920672c6f0dbb66cf0,71eb6cb26d3a333f8840f78848ad74986f689754..a7af771744e91e3654bd216b217f40a56eae11ea
+++ b/NEWS.md
@@@ -1,22 -1,6 +1,23 @@@
  NEWS
  ====
  
 +------------------------------------------
 +0.5.7 (to be announced) "semantic density"
 +------------------------------------------
 +- Speedup of the base64 decoder.
 +- One of the two source browsers has been removed from the web pages.
 +  The doxygen API reference still contains an HTML version of each
 +  source file.
 +- Two race conditions in para_server have been fixed.
 +- ls -p is now deprecated in favor of -F or -b. See the help text of
 +  the ls command for details.
 +- The openssl code has been adjusted to work also with openssl-1.1.
 +- The wma decoder and audio format handler now correctly decodes
 +  files with unusual block sizes.
++- We now compile with -Wformat-signedness if possible.
 +
 +Download: [tarball](./releases/paraslash-git.tar.bz2)
 +
  ---------------------------------------
  0.5.6 (2016-07-10) "cascading gradient"
  ---------------------------------------
diff --cc aac_afh.c
index a30be96f4f9da70b841e26fd16a3044ebc1df8ac,bcd2a14edfd8de64baaca165f17ae855490e8cc9..1c7fd706f0a7c9fe8c9d4d8db43846be18a9304d
+++ b/aac_afh.c
@@@ -33,12 -32,12 +33,12 @@@ static int aac_find_stsz(char *buf, siz
                        continue;
                PARA_DEBUG_LOG("found stsz@%d\n", i);
                i += 8;
 -              sample_size = aac_read_int32(buf + i);
 +              sample_size = read_u32_be(buf + i);
-               PARA_DEBUG_LOG("sample size: %d\n", sample_size);
+               PARA_DEBUG_LOG("sample size: %u\n", sample_size);
                i += 4;
 -              sample_count = aac_read_int32(buf + i);
 +              sample_count = read_u32_be(buf + i);
                i += 4;
-               PARA_DEBUG_LOG("sample count: %d\n", sample_count);
+               PARA_DEBUG_LOG("sample count: %u\n", sample_count);
                *skip = i;
                return sample_count;
        }
diff --cc aac_common.c
index 70a9d77d51b320ee8511f394186528164362273a,fe9b7295f55cc7614278669c670f3bec39827347..812c742cf668e7ad67e6f5b502fbe6c93829f0a3
@@@ -73,18 -72,18 +73,18 @@@ int aac_find_esds(char *buf, size_t buf
                        continue;
                i += 8;
                p = buf + i;
--              PARA_INFO_LOG("found esds@%zu, next: %x\n", i, *p);
++              PARA_INFO_LOG("found esds@%zu, next: %x\n", i, (unsigned)*p);
                if (*p == 3)
                        i += 8;
                else
                        i += 6;
                p = buf + i;
--              PARA_INFO_LOG("next: %x\n", *p);
++              PARA_INFO_LOG("next: %x\n", (unsigned)*p);
                if (*p != 4)
                        continue;
                i += 18;
                p = buf + i;
--              PARA_INFO_LOG("next: %x\n", *p);
++              PARA_INFO_LOG("next: %x\n", (unsigned)*p);
                if (*p != 5)
                        continue;
                i++;
diff --cc aacdec_filter.c
Simple merge
diff --cc afs.c
Simple merge
diff --cc aft.c
Simple merge
diff --cc crypt_common.c
Simple merge
diff --cc fade.c
Simple merge
diff --cc gcrypt.c
Simple merge
diff --cc play.c
Simple merge
diff --cc server.c
Simple merge
diff --cc wma_common.c
index 27cb51d0434367e168fa49554e05bf1f13d9f473,95bb9ace57665ba0b9050f9fa512a750a913d52a..6d57c00be2d2627624f5642a74948723bc2726fb
@@@ -42,17 -42,6 +42,17 @@@ const char *search_pattern(const char *
        return NULL;
  }
  
-       PARA_DEBUG_LOG("found file property guid@%0x\n", (int)(p - buf));
 +static int find_file_properties(const char *buf, int len)
 +{
 +      const char pattern[] = {0xa1, 0xdc, 0xab, 0x8c};
 +      const char *p = search_pattern(pattern, sizeof(pattern), buf, len);
 +
 +      if (!p)
 +              return -E_WMA_NO_GUID;
++      PARA_DEBUG_LOG("found file property guid@%0x\n", (unsigned)(p - buf));
 +      return p - buf + 16;
 +}
 +
  /*
     40 9e 69 f8 4d 5b cf 11  a8 fd 00 80 5f 5c 44 2b
   */
@@@ -118,7 -107,7 +118,7 @@@ int read_asf_header(const char *buf, in
  
        ahi->flags1 = read_u32(start + 56);
        ahi->flags2 = read_u16(start + 60);
-       PARA_INFO_LOG("read_asf_header: flags1: %d, flags2: %d\n",
 -      PARA_INFO_LOG("read_asf_header: flags1: %u, flag2: %u\n",
++      PARA_INFO_LOG("read_asf_header: flags1: %u, flags2: %u\n",
                ahi->flags1, ahi->flags2);
        ahi->use_exp_vlc = ahi->flags2 & 0x0001;
        ahi->use_bit_reservoir = ahi->flags2 & 0x0002;
diff --cc wmadec_filter.c
Simple merge