mirror of https://gitee.com/openkylin/qemu.git
coverity: fix address_space_rw model
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVSILqAAoJEDhwtADrkYZTISsP/A0XOvVf9OxiesGqzNg60pvI pUu9cHX8Xat5iuMEKji+cSQsP202ZtdR5E0AKD1GixkXDF2hGOgabn7O3Y+P9gGo A4auwhkGDcl8FtsZb5y8rg552OejLT7Hvnir1yZ7yO+Sj/4eZ8yRysZG9T3bvT4N rMQqIF9wkW+obR5/S+Rz86MxU+1EOb6bjJvMz/+42j9ZiijgfHAu7wIodOmGjFWc ueEOD63X7zWlMNmHQ7p33OKK5hvQ8Z4/p4tnP2ywrFSa4tXrs7ziMS3Dyqd6ZZiY GVRJp0o1cY4ywQjbsZocpDMRR/FudSr2KNQvQUPAiSqcDqqpyCuThwJO/Uj9Tysr QL2PtpMKOj/NBBa1qhPBJubnH43uHkjKQx3r/Y7FIQlGUgvL0B3dmSUihAdXrKRW QGJQqUW4jlRVGc7LWlS76iEyG6279ZeTy43vGFX6+dFkHc/SA5hi83341xCNTMH/ G0ApoXHtv9qxSkf9Uqn2tEH3+Gc6KkxEsJLQGj3UkKHqOzxjASo+1NXUXyU+IdhV Jgp0LJF4mAShAbKDJDbgTbAlpJTahQvLTR35HYlawY+wFfQYG9v37gb7dAwKlTg+ lKCnei3UaXAINCcg60eolEbOTzF2oj6oCBqsZXw8BsrinC5/cnqe5yk8h/3NliEW 49CET+VWa9ccKC7jG6j2 =zZ2L -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-cov-model-2015-05-05' into staging coverity: fix address_space_rw model # gpg: Signature made Tue May 5 09:44:26 2015 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-cov-model-2015-05-05: coverity: fix address_space_rw model Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
b4c5df7a15
|
@ -49,7 +49,7 @@ typedef uint64_t hwaddr;
|
|||
typedef uint32_t MemTxResult;
|
||||
typedef uint64_t MemTxAttrs;
|
||||
|
||||
static void __write(uint8_t *buf, ssize_t len)
|
||||
static void __bufwrite(uint8_t *buf, ssize_t len)
|
||||
{
|
||||
int first, last;
|
||||
__coverity_negative_sink__(len);
|
||||
|
@ -59,7 +59,7 @@ static void __write(uint8_t *buf, ssize_t len)
|
|||
__coverity_writeall__(buf);
|
||||
}
|
||||
|
||||
static void __read(uint8_t *buf, ssize_t len)
|
||||
static void __bufread(uint8_t *buf, ssize_t len)
|
||||
{
|
||||
__coverity_negative_sink__(len);
|
||||
if (len == 0) return;
|
||||
|
@ -74,7 +74,7 @@ MemTxResult address_space_rw(AddressSpace *as, hwaddr addr, MemTxAttrs attrs,
|
|||
|
||||
// TODO: investigate impact of treating reads as producing
|
||||
// tainted data, with __coverity_tainted_data_argument__(buf).
|
||||
if (is_write) __write(buf, len); else __read(buf, len);
|
||||
if (is_write) __bufread(buf, len); else __bufwrite(buf, len);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue