AdaCore / AdaCore/aws

Upgrade of zlib required to solve compilation warnings due to K&R style

Open
#398 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
162
Forks
45
PR merge metrics
No merged PRs in 30d

Description

When we compile aws with GNAT >= 15, we now have many compilation warnings:

/src/gnat/aws/include/zlib/uncompr.c: In function 'uncompress2':
/src/gnat/aws/include/zlib/uncompr.c:27:13: warning: old-style function definition [-Wold-style-definition]
   27 | int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
      |             ^~~~~~~~~~~
/src/gnat/aws/include/zlib/uncompr.c: In function 'uncompress':
/src/gnat/aws/include/zlib/uncompr.c:86:13: warning: old-style function definition [-Wold-style-definition]
   86 | int ZEXPORT uncompress (dest, destLen, source, sourceLen)
      |             ^~~~~~~~~~
/src/gnat/aws/include/zlib/compress.c: In function 'compress2':
/src/gnat/aws/include/zlib/compress.c:22:13: warning: old-style function definition [-Wold-style-definition]
   22 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
      |             ^~~~~~~~~

because the include/zlib integration corresponds to the 1.2.11 version, integrated on Feb 3 2019.

Since then, the zlib library was improved and updated to use ANSI C.
Integration of zlib 1.3.2 fixes these compilation warnings.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the vendored zlib sources under include/zlib and confirm the integrated code is based on zlib 1.2.11. Update that integration to zlib 1.3.2, then compile AWS with GNAT >= 15 and verify that the K&R-style function-definition warnings are gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.