[compiler-rt] r196948 - Fix minor gcc warnings.
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Dec 10 11:05:43 PST 2013
Author: arsenm
Date: Tue Dec 10 13:05:43 2013
New Revision: 196948
URL: http://llvm.org/viewvc/llvm-project?rev=196948&view=rev
Log:
Fix minor gcc warnings.
C++ style comments not allowed in C90,
signed unsigned comparision.
Modified:
compiler-rt/trunk/lib/profile/GCDAProfiling.c
Modified: compiler-rt/trunk/lib/profile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=196948&r1=196947&r2=196948&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Tue Dec 10 13:05:43 2013
@@ -403,7 +403,7 @@ void llvm_gcda_emit_arcs(uint32_t num_co
}
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);
More information about the llvm-commits
mailing list