Project

General

Profile

action #113704

compile warning in tinycv.xs with newer GCC size:S

Added by okurz 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Concrete Bugs
Target version:
Start date:
2022-07-18
Due date:
2022-07-29
% Done:

0%

Estimated time:
Difficulty:

Description

Observation

https://build.opensuse.org/public/build/devel:openQA/openSUSE_Tumbleweed/x86_64/os-autoinst/_log shows

[   94s] [8/16] /usr/bin/c++ -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dtinycv_EXPORTS -I/home/abuild/rpmbuild/BUILD/os-autoinst-4.6.1657917330.5634bdd/ppmclibs -I/usr/lib/perl5/5.36.0/x86_64-linux-thread-multi/CORE -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -fPIC -MD -MT ppmclibs/CMakeFiles/tinycv.dir/tinycv-xs.cpp.o -MF ppmclibs/CMakeFiles/tinycv.dir/tinycv-xs.cpp.o.d -o ppmclibs/CMakeFiles/tinycv.dir/tinycv-xs.cpp.o -c /home/abuild/rpmbuild/BUILD/os-autoinst-4.6.1657917330.5634bdd/build/ppmclibs/tinycv-xs.cpp
[   94s] /home/abuild/rpmbuild/BUILD/os-autoinst-4.6.1657917330.5634bdd/ppmclibs/tinycv.xs: In function 'void XS_tinycv_from_ppm(PerlInterpreter*, CV*)':
[   94s] /home/abuild/rpmbuild/BUILD/os-autoinst-4.6.1657917330.5634bdd/ppmclibs/tinycv.xs:113:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
[   94s]   113 |     register unsigned char *buf = (unsigned char*)SvPV(data, len);
[   94s]       |                             ^~~

Steps to reproduce

podman run --rm -it registry.opensuse.org/opensuse/tumbleweed /bin/sh -c 'zypper -n in os-autoinst-devel && git -C /opt clone https://github.com/os-autoinst/os-autoinst && make -C /opt/os-autoinst'

Acceptance criteria

  • AC1: build warning does not appear anymore in builds
  • AC2: os-autoinst still builds for Leap as well as Tumbleweed

Suggestions

  • Research about "warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]"
  • Fix accordingly in a backward-compatible way in ppmclibs/tinycv.xs

History

#1 Updated by jbaier_cz 3 months ago

'register' is deprecated (since C++11) storage class specifier: https://en.cppreference.com/w/cpp/language/storage_duration

It is probably safe to just remove.

Also: https://cplusplus.github.io/CWG/issues/809.html

#2 Updated by okurz 3 months ago

  • Due date set to 2022-07-29
  • Status changed from New to Feedback
  • Assignee set to jbaier_cz

#3 Updated by cdywan 3 months ago

  • Subject changed from compile warning in tinycv.xs with newer GCC to compile warning in tinycv.xs with newer GCC size:S
  • Status changed from Feedback to Resolved

The branch was merged and seems to be fine now

Also available in: Atom PDF