qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix OpenBSD linker warnings
@ 2008-08-15 20:20 Blue Swirl
  2008-08-17 20:19 ` [Qemu-devel] " Blue Swirl
  2008-08-18 14:09 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Blue Swirl @ 2008-08-15 20:20 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

OpenBSD gcc issues warnings for some suspicious constructs, like:
slirp/tcp_subr.c:1077: warning: Array size (256) smaller than format
string size (257) (arg 3)
vl.o(.text+0x7bc0): In function `drive_init':
vl.c:5464: warning: strcpy() is almost always misused, please use strlcpy()

This patch silences the warnings. Comments?

[-- Attachment #2: fix_obsd_ld_warnings.diff --]
[-- Type: plain/text, Size: 23669 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH] Fix OpenBSD linker warnings
  2008-08-15 20:20 [Qemu-devel] [PATCH] Fix OpenBSD linker warnings Blue Swirl
@ 2008-08-17 20:19 ` Blue Swirl
  2008-08-18 14:09 ` [Qemu-devel] " Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2008-08-17 20:19 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On 8/15/08, Blue Swirl <blauwirbel@gmail.com> wrote:
> OpenBSD gcc issues warnings for some suspicious constructs, like:
>  slirp/tcp_subr.c:1077: warning: Array size (256) smaller than format
>  string size (257) (arg 3)
>  vl.o(.text+0x7bc0): In function `drive_init':
>  vl.c:5464: warning: strcpy() is almost always misused, please use strlcpy()
>
>  This patch silences the warnings. Comments?

Updated patch with more fixes attached.

It's easy to make mistakes with these kind of changes, so review and
comments are welcome.

[-- Attachment #2: fix_obsd_ld_warnings.diff --]
[-- Type: plain/text, Size: 35867 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix OpenBSD linker warnings
  2008-08-15 20:20 [Qemu-devel] [PATCH] Fix OpenBSD linker warnings Blue Swirl
  2008-08-17 20:19 ` [Qemu-devel] " Blue Swirl
@ 2008-08-18 14:09 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-08-18 14:09 UTC (permalink / raw)
  To: qemu-devel

Blue Swirl wrote:
> OpenBSD gcc issues warnings for some suspicious constructs, like:
> slirp/tcp_subr.c:1077: warning: Array size (256) smaller than format
> string size (257) (arg 3)
> vl.o(.text+0x7bc0): In function `drive_init':
> vl.c:5464: warning: strcpy() is almost always misused, please use strlcpy()
>
> This patch silences the warnings. Comments?
>   

Definitely a good thing.  strcpy()/sprintf() should never be used IMHO.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-18 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-15 20:20 [Qemu-devel] [PATCH] Fix OpenBSD linker warnings Blue Swirl
2008-08-17 20:19 ` [Qemu-devel] " Blue Swirl
2008-08-18 14:09 ` [Qemu-devel] " Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).