summaryrefslogtreecommitdiff
path: root/gcc/gcov-io.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-03 14:39:05 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-03 14:39:05 +0000
commitd69521d8e318362ab011819499294da78cdad64c (patch)
tree0f9f89a40e0f06ad2065a6c8389c198699c9f249 /gcc/gcov-io.c
parent840ab4e2501e4782c336958058bc48cf2c20069a (diff)
downloadgcc-d69521d8e318362ab011819499294da78cdad64c.tar.gz
* gcov-io.c (gcov_read_words): Don't call memmove if excess is 0.
* data-streamer-in.c (streamer_read_hwi): Shift UHWI 1 instead of HWI 1 and negate the unsigned value. * expmed.c (expand_sdiv_pow2): For modes wider than word always use AND instead of shift. * wide-int-print.cc (print_decs): Negate UHWI instead of HWI. c-family/ * c-ada-spec.c (dump_ada_nodes): Don't call qsort if comments->count <= 1, as comments->entries might be NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212264 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-io.c')
-rw-r--r--gcc/gcov-io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index 1fdb9583ee8..547276fbcf0 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -489,14 +489,15 @@ gcov_read_words (unsigned words)
if (excess < words)
{
gcov_var.start += gcov_var.offset;
-#if IN_LIBGCOV
if (excess)
{
+#if IN_LIBGCOV
memcpy (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, 4);
- }
#else
- memmove (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, excess * 4);
+ memmove (gcov_var.buffer, gcov_var.buffer + gcov_var.offset,
+ excess * 4);
#endif
+ }
gcov_var.offset = 0;
gcov_var.length = excess;
#if IN_LIBGCOV