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

Warnings during compilation #22

Open
drasko opened this issue May 17, 2021 · 2 comments
Open

Warnings during compilation #22

drasko opened this issue May 17, 2021 · 2 comments

Comments

@drasko
Copy link

drasko commented May 17, 2021

===> Compiling bcrypt
make: Entering directory '/home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src'
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -D_BSD_SOURCE -fPIC -I /usr/lib/erlang/erts-11.2/include/ -I /usr/lib/erlang/lib/erl_interface-4.0.2/include  -c -o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_port.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_port.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:0,
                 from /usr/include/stdio.h:27,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_port.c:17:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -D_BSD_SOURCE -fPIC -I /usr/lib/erlang/erts-11.2/include/ -I /usr/lib/erlang/lib/erl_interface-4.0.2/include  -c -o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_nif.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_nif.c
In file included from /usr/include/assert.h:35:0,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_nif.c:17:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -D_BSD_SOURCE -fPIC -I /usr/lib/erlang/erts-11.2/include/ -I /usr/lib/erlang/lib/erl_interface-4.0.2/include  -c -o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:0,
                 from /usr/include/stdio.h:27,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c:48:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
/home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c: In function �encode_salt�:
/home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c:137:31: warning: �__builtin___snprintf_chk� output may be truncated before the last format character [-Wformat-truncation=]
  snprintf(salt + 4, 4, "%2.2u$", logr);
                               ^
In file included from /usr/include/stdio.h:862:0,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c:48:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: �__builtin___snprintf_chk� output between 4 and 5 bytes into a destination of size 4
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c: In function �ts_bcrypt�:
/home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c:241:36: warning: �__builtin___snprintf_chk� output may be truncated before the last format character [-Wformat-truncation=]
  snprintf(encrypted + i, 4, "%2.2u$", logr);
                                    ^
In file included from /usr/include/stdio.h:862:0,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.c:48:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: �__builtin___snprintf_chk� output between 4 and 5 bytes into a destination of size 4
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -D_BSD_SOURCE -fPIC -I /usr/lib/erlang/erts-11.2/include/ -I /usr/lib/erlang/lib/erl_interface-4.0.2/include  -c -o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/async_queue.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/async_queue.c
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:25:0,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/async_queue.h:36,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/async_queue.c:32:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -D_BSD_SOURCE -fPIC -I /usr/lib/erlang/erts-11.2/include/ -I /usr/lib/erlang/lib/erl_interface-4.0.2/include  -c -o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/blowfish.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/blowfish.c
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:25:0,
                 from /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/blowfish.c:47:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
cc /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_port.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt_nif.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/bcrypt.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/async_queue.o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/blowfish.o  -shared -L /usr/lib/erlang/lib/erl_interface-4.0.2/lib -lei -lpthread -o /home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src/../priv/bcrypt_nif.so
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -D_BSD_SOURCE -fPIC -I /usr/lib/erlang/erts-11.2/include/ -I /usr/lib/erlang/lib/erl_interface-4.0.2/include bcrypt_port.o bcrypt.o blowfish.o  -L /usr/lib/erlang/lib/erl_interface-4.0.2/lib -lei -lpthread -o ../priv/bcrypt
make: Leaving directory '/home/drasko/erlang/zenith/zenith/_build/default/lib/bcrypt/c_src'
@mworrell
Copy link
Member

mworrell commented May 19, 2021

Hi, Thanks for your report.

We might be able to check if there is a newer bcrypt.c file that could be included and might fix the warnings.

For the _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE warning, I am not sure if fixing that for macOS/Linux would give a problem on BSD? update: It is a Linux flag - so can be removed.

What OS are you using?

@mworrell
Copy link
Member

There is a newer bcrypt version here: https://github.com/openbsd/src/blob/master/lib/libc/crypt/bcrypt.c

This was referenced May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants