Skip to content

Commit

Permalink
Merge pull request #2603 from xrmx/fix-clang-format-signedness
Browse files Browse the repository at this point in the history
Fix clang format signedness
  • Loading branch information
xrmx authored Feb 8, 2024
2 parents db31b77 + bb41750 commit 5d13955
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/compile-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ jobs:
- os: ubuntu-20.04
php: "php7.4"
php-config: "php-config7.4"
cc: "gcc"
- os: ubuntu-22.04
php: "php8.1"
php-config: "php-config8.1"
cc: "gcc"
- os: ubuntu-22.04
php: "php8.1"
php-config: "php-config8.1"
cc: "clang"

runs-on: ${{ matrix.os }}

Expand All @@ -43,16 +49,16 @@ jobs:
libcurl4-openssl-dev \
openjdk-11-jdk libgloox-dev gccgo \
cli-common-dev mono-devel mono-mcs uuid-dev \
curl check
- uses: actions/checkout@v2
- name: Build kitchensink uWSGI binary
run: UWSGICONFIG_PHPPATH=${{ matrix.php-config }} /usr/bin/python3 uwsgiconfig.py --build travis
curl check ${{ matrix.cc == 'clang' && 'clang' || '' }}
- uses: actions/checkout@v4
- name: Build kitchensink uWSGI binary with gcc or default with clang
run: CC=${{ matrix.cc }} UWSGICONFIG_PHPPATH=${{ matrix.php-config }} /usr/bin/python3 uwsgiconfig.py --build ${{ matrix.cc == 'gcc' && 'travis' || '' }}
- name: Build uWSGI binary
run: |
/usr/bin/python3 uwsgiconfig.py --build base
CC=${{ matrix.cc }} /usr/bin/python3 uwsgiconfig.py --build base
- name: Build cgi plugin
run: |
/usr/bin/python3 uwsgiconfig.py --plugin plugins/cgi base
CC=${{ matrix.cc }} /usr/bin/python3 uwsgiconfig.py --plugin plugins/cgi base
- name: Build dummy plugin
run: |
/usr/bin/python3 uwsgiconfig.py --plugin plugins/dummy base
CC=${{ matrix.cc }} /usr/bin/python3 uwsgiconfig.py --plugin plugins/dummy base
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
if: contains(fromJson('["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]'), matrix.python-version)
run: |
sudo apt install --no-install-recommends -qqyf python${{ matrix.python-version }}-distutils \
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run unit tests
if: matrix.test-suite == 'unittest'
run: make tests
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
sudo apt install --no-install-recommends -qqyf python3-dev \
libpcre3-dev libjansson-dev libcap2-dev ruby2.7-dev \
curl check
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run unit tests
run: make tests
- name: Build uWSGI binary
Expand Down
8 changes: 5 additions & 3 deletions uwsgiconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,16 +679,18 @@ def __init__(self, filename, mute=False):
if 'UWSGI_INCLUDES' in os.environ:
self.include_path += os.environ['UWSGI_INCLUDES'].split(',')

self.cflags = [
cflags = [
'-O2',
'-I.',
'-Wall',
'-Werror',
'-Wformat-signedness',
'-Wno-error=deprecated-declarations',
'-D_LARGEFILE_SOURCE',
'-D_FILE_OFFSET_BITS=64'
] + os.environ.get("CFLAGS", "").split() + self.get('cflags', '').split()
]
if "gcc" in GCC:
cflags.append('-Wformat-signedness')
self.cflags = cflags + os.environ.get("CFLAGS", "").split() + self.get('cflags', '').split()

python_venv_include = os.path.join(sys.prefix, 'include', 'site',
'python{0}.{1}'.format(*sys.version_info))
Expand Down

0 comments on commit 5d13955

Please sign in to comment.