diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-12-10 19:05:43 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-12-10 19:05:43 +0000 |
| commit | d326252d2961eec5ac34ec19eda84b40d4637845 (patch) | |
| tree | 8ce18c6769baf429648197070e49ee842748c634 | |
| parent | 0f5f015bfd457fe4353aca47ab03f9b59b73bde3 (diff) | |
| download | bcm5719-llvm-d326252d2961eec5ac34ec19eda84b40d4637845.tar.gz bcm5719-llvm-d326252d2961eec5ac34ec19eda84b40d4637845.zip | |
Fix minor gcc warnings.
C++ style comments not allowed in C90,
signed unsigned comparision.
llvm-svn: 196948
| -rw-r--r-- | compiler-rt/lib/profile/GCDAProfiling.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c index 1efbbcdf57b..3104ee4cd9d 100644 --- a/compiler-rt/lib/profile/GCDAProfiling.c +++ b/compiler-rt/lib/profile/GCDAProfiling.c @@ -403,7 +403,7 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) { } void llvm_gcda_summary_info() { - const int obj_summary_len = 9; // length for gcov compatibility + const uint32_t obj_summary_len = 9; /* Length for gcov compatibility. */ uint32_t i; uint32_t runs = 1; uint32_t val = 0; @@ -420,15 +420,15 @@ void llvm_gcda_summary_info() { return; } - val = read_32bit_value(); // length + val = read_32bit_value(); /* length */ if (val != obj_summary_len) { - fprintf(stderr, "profiling:invalid object length (%d)\n", val); // length + fprintf(stderr, "profiling:invalid object length (%d)\n", val); return; } - read_32bit_value(); // checksum, unused - read_32bit_value(); // num, unused - runs += read_32bit_value(); // add previous run count to new counter + read_32bit_value(); /* checksum, unused */ + read_32bit_value(); /* num, unused */ + runs += read_32bit_value(); /* Add previous run count to new counter. */ } cur_pos = save_cur_pos; @@ -436,15 +436,15 @@ void llvm_gcda_summary_info() { /* Object summary tag */ write_bytes("\0\0\0\xa1", 4); write_32bit_value(obj_summary_len); - write_32bit_value(0); // checksum, unused - write_32bit_value(0); // num, unused + write_32bit_value(0); /* checksum, unused */ + write_32bit_value(0); /* num, unused */ write_32bit_value(runs); - for (i = 3; i < obj_summary_len; ++i) + for (i = 3; i < obj_summary_len; ++i) write_32bit_value(0); /* Program summary tag */ - write_bytes("\0\0\0\xa3", 4); // tag indicates 1 program - write_32bit_value(0); // 0 length + write_bytes("\0\0\0\xa3", 4); /* tag indicates 1 program */ + write_32bit_value(0); /* 0 length */ #ifdef DEBUG_GCDAPROFILING fprintf(stderr, "llvmgcda: %u runs\n", runs); |

