Skip to content

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

Description

@eribertomota

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions