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 | 3708634597e2d25705ef7ee8cf71a3a7bff7a10b (patch) | |
tree | da506adc0186683f25949dbc80321e879d2394cc /lib/profile/GCDAProfiling.c | |
parent | 72323c99788d95c12f6af0388c8379ceb4cc688d (diff) |
Fix minor gcc warnings.
C++ style comments not allowed in C90,
signed unsigned comparision.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/GCDAProfiling.c')
-rw-r--r-- | lib/profile/GCDAProfiling.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c index 1efbbcdf5..3104ee4cd 100644 --- a/lib/profile/GCDAProfiling.c +++ b/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); |