Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: type of ' METHODS_SENTINEL' does not match original declaration #5315

Open
rtsisyk opened this issue Sep 19, 2020 · 1 comment
Open
Labels
bug Something isn't working build

Comments

@rtsisyk
Copy link
Contributor

rtsisyk commented Sep 19, 2020

Tarantool version:

tarantool-2.4.2.68

OS version:

Fedora 33 Workstation Edition Prerelease

gcc --version
gcc (GCC) 10.2.1 20200804 (Red Hat 10.2.1-2)

Bug description:

Please fix noisy warnings.

/home/roman/Documents/Source/fedora-tarantool.git/tarantool-2.4.2.68/src/lib/core/reflection.h:124:33: warning: type of '
METHODS_SENTINEL' does not match original declaration [-Wlto-type-mismatch]                                              
  124 | extern const struct method_info METHODS_SENTINEL;                                                                
      |                                 ^                                                                                /home/roman/Documents/Source/fedora-tarantool.git/tarantool-2.4.2.68/src/lib/core/reflection.c:35:26: note: 'METHODS_SENT
INEL' was previously declared here                                                                                       
   35 | const struct method_info METHODS_SENTINEL = {                                                                    
      |      
warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  230 |  ldata[chunk] |= (1UL << offset);
      |               ^
/home/roman/Documents/Source/fedora-tarantool.git/tarantool-2.4.2.68/src/box/sql/select.c: In function 'sqlSelectNew':
/home/roman/Documents/Source/fedora-tarantool.git/tarantool-2.4.2.68/src/box/sql/select.c:207:9: warning: function may return address of local variable [-Wreturn-local-addr]
  207 |  return pNew;
      |         ^
/home/roman/Documents/Source/fedora-tarantool.git/tarantool-2.4.2.68/src/box/sql/select.c:158:9: note: declared here
  158 |  Select standin;
      |         ^
@kyukhin kyukhin added bug Something isn't working build labels Sep 21, 2020
@kyukhin kyukhin added this to the 2.4.3 milestone Sep 21, 2020
@Totktonada
Copy link
Member

Related to #3742.

tarantool/cmake/lto.cmake

Lines 107 to 108 in 0018398

# FIXME: gh-3742: investigate LTO warnings.
list(APPEND LDFLAGS_LTO -Wno-lto-type-mismatch)

It seems -flto is added directly instead of cmake <...> -DENABLE_LTO=ON.

@kyukhin kyukhin modified the milestones: 2.4.3, wishlist Oct 23, 2020
@kyukhin kyukhin removed this from the wishlist milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build
Projects
None yet
Development

No branches or pull requests

3 participants