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 when building in Debian (v2.14) #4

Open
eribertomota opened this issue Sep 18, 2017 · 3 comments
Open

Warnings when building in Debian (v2.14) #4

eribertomota opened this issue Sep 18, 2017 · 3 comments
Assignees

Comments

@eribertomota
Copy link
Contributor

Hi,

When building ssdeep 2.14 in Debian, I can see the following messages:

main.cpp: In function ‘void generate_filename(state*, char*, char*, char*)’:
main.cpp:242:15: warning: ignoring return value of ‘char* realpath(const char*, char*)’, declared with attribute warn_unused_result [-Wunused-result]
       realpath(input, fn);
       ~~~~~~~~^~~~~~~~~~~
engine.cpp: In function ‘int hash_file(state*, char*)’:
engine.cpp:58:5: warning: ‘%s’ directive output truncated writing 79 bytes into a region of size 68 [-Wformat-truncation=]
 int hash_file(state *s, TCHAR *fn) {
     ^~~~~~~~~
In file included from /usr/include/stdio.h:938:0,
                 from main.h:27,
                 from engine.cpp:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output 89 or more bytes into a destination of size 77
        __bos (__s), __fmt, __va_arg_pack ());
                                            ^
engine.cpp:58:5: warning: ‘%s’ directive output truncated writing 79 bytes into a region of size 68 [-Wformat-truncation=]
 int hash_file(state *s, TCHAR *fn) {
     ^~~~~~~~~
In file included from /usr/include/stdio.h:938:0,
                 from main.h:27,
                 from engine.cpp:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output 89 or more bytes into a destination of size 77
        __bos (__s), __fmt, __va_arg_pack ());

                                            ^
[...]


cycles.cpp: In function ‘int done_processing_dir(char*)’:
cycles.cpp:51:11: warning: ignoring return value of ‘char* realpath(const char*, char*)’, declared with attribute warn_unused_result [-Wunused-result]
   realpath(fn,d_name);
   ~~~~~~~~^~~~~~~~~~~
cycles.cpp: In function ‘int processing_dir(char*)’:
cycles.cpp:107:11: warning: ignoring return value of ‘char* realpath(const char*, char*)’, declared with attribute warn_unused_result [-Wunused-result]
   realpath(fn,d_name);
   ~~~~~~~~^~~~~~~~~~~
cycles.cpp: In function ‘int have_processed_dir(char*)’:
cycles.cpp:158:11: warning: ignoring return value of ‘char* realpath(const char*, char*)’, declared with attribute warn_unused_result [-Wunused-result]
   realpath(fn,d_name);
   ~~~~~~~~^~~~~~~~~~~

[...]


ar: `u' modifier ignored since `D' is the default (see `U')**

Thanks!

Regards,

Eriberto

@a4lg
Copy link
Collaborator

a4lg commented Sep 18, 2017

It appears all problems existed before version 2.14 but I'm investigating...

warning: ignoring return value of ‘char* realpath(const char*, char*)’, declared with attribute warn_unused_result [-Wunused-result]

This is indeed a problem when realpath fails. I consider this a low priority issue and will be fixed on the next version.

warning: ‘%s’ directive output truncated writing 79 bytes into a region of size 68 [-Wformat-truncation=]

This (itself) is not a problem. It's definitely a false-positive warning but this part of the code could be rewritten because it assumes fixed-width terminal.

ar: `u' modifier ignored since `D' is the default (see `U')**

No problem. It always happens because ar is updated.

@a4lg
Copy link
Collaborator

a4lg commented Sep 18, 2017

I'll leave this issue open until I commit realpath fix but I think nothing is blocking us from releasing Debian version of ssdeep 2.14. -- Oh, I forgot to refresh the page. Thanks for releasing it!

@a4lg a4lg self-assigned this Sep 18, 2017
@eribertomota
Copy link
Contributor Author

eribertomota commented Sep 19, 2017 via email

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