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

rgw: warning, output may be truncated before the last format character #14192

Closed
wants to merge 2 commits into from

Conversation

joscollin
Copy link
Member

The following warning appears during make:

```
rgw_rados.cc: In function ‘void usage_log_hash(CephContext*, const string&, std::__cxx11::string&, uint32_t)’:
rgw_rados.cc:4579:13: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
 static void usage_log_hash(CephContext *cct, const string& name, string& hash, uint32_t index)
             ^~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 8 and 17 bytes into a destination of size 16
        __bos (__s), __fmt, __va_arg_pack ());
```

Signed-off-by: Jos Collin jcollin@redhat.com

The following headers are already included by the other included header files in rgw_common.h. So removed them.

Signed-off-by: Jos Collin <jcollin@redhat.com>
The following warning appears during make:

```
rgw_rados.cc: In function ‘void usage_log_hash(CephContext*, const string&, std::__cxx11::string&, uint32_t)’:
rgw_rados.cc:4579:13: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
 static void usage_log_hash(CephContext *cct, const string& name, string& hash, uint32_t index)
             ^~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 8 and 17 bytes into a destination of size 16
        __bos (__s), __fmt, __va_arg_pack ());
```

Signed-off-by: Jos Collin <jcollin@redhat.com>
@joscollin joscollin closed this Mar 28, 2017
@joscollin joscollin deleted the wip-rgw-4579-13-warning branch March 28, 2017 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant