1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/devicemapper
Kir Kolyshkin 7da12bcfa9 devmapper_wrapper.go: fix gcc warning
I am getting the following warning from gcc when compiling the daemon:

> # github.com/docker/docker/pkg/devicemapper
> pkg/devicemapper/devmapper_wrapper.go: In function ‘log_cb’:
> pkg/devicemapper/devmapper_wrapper.go:20:2: warning: ignoring return
> value of ‘vasprintf’, declared with attribute warn_unused_result
> [-Wunused-result]
>  vasprintf(&buffer, f, ap);
>  ^

vasprintf(3) man page says if the function returns -1, the buffer is
undefined, so we should not use it. In practice, I assume, this never
happens so we just return.

Introduced by https://github.com/moby/moby/pull/33845 that resulted in
commit 63328c6 ("devicemapper: remove 256 character limit of libdm logs")

Cc: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-07-17 17:46:44 -07:00
..
devmapper.go Merge pull request #33845 from cyphar/devicemapper-show-me-your-logs 2017-07-12 17:46:14 -07:00
devmapper_log.go devicemapper: change LogInit and move all callbacks to pkg 2017-07-04 02:04:26 +10:00
devmapper_wrapper.go devmapper_wrapper.go: fix gcc warning 2017-07-17 17:46:44 -07:00
devmapper_wrapper_deferred_remove.go Make pkg/devicemapper and pkg/loopback depend on cgo in build tags 2017-03-29 17:55:42 -07:00
devmapper_wrapper_no_deferred_remove.go Make pkg/devicemapper and pkg/loopback depend on cgo in build tags 2017-03-29 17:55:42 -07:00
ioctl.go [project] change syscall to /x/sys/unix|windows 2017-07-11 08:00:32 -04:00
log.go devicemapper: define device-mapper log levels 2015-01-20 13:31:12 -05:00