target: -Wshdaow warning fix

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Øyvind Harboe 2010-06-15 23:07:45 +02:00
parent 83ebddd519
commit 64cf05f0c4
1 changed files with 5 additions and 5 deletions

View File

@ -3065,8 +3065,8 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, const char *filenam
long long a = address-min; long long a = address-min;
long long b = length-1; long long b = length-1;
long long c = addressSpace-1; long long c = addressSpace-1;
int index = (a*b)/c; /* danger!!!! int32 overflows */ int index_t = (a*b)/c; /* danger!!!! int32 overflows */
buckets[index]++; buckets[index_t]++;
} }
/* append binary memory gmon.out &profile_hist_hdr ((char*)&profile_hist_hdr + sizeof(struct gmon_hist_hdr)) */ /* append binary memory gmon.out &profile_hist_hdr ((char*)&profile_hist_hdr + sizeof(struct gmon_hist_hdr)) */
@ -3894,14 +3894,14 @@ static int target_configure(Jim_GetOptInfo *goi, struct target *target)
break; break;
case TCFG_CHAIN_POSITION: case TCFG_CHAIN_POSITION:
if (goi->isconfigure) { if (goi->isconfigure) {
Jim_Obj *o; Jim_Obj *o_t;
struct jtag_tap *tap; struct jtag_tap *tap;
target_free_all_working_areas(target); target_free_all_working_areas(target);
e = Jim_GetOpt_Obj(goi, &o); e = Jim_GetOpt_Obj(goi, &o_t);
if (e != JIM_OK) { if (e != JIM_OK) {
return e; return e;
} }
tap = jtag_tap_by_jim_obj(goi->interp, o); tap = jtag_tap_by_jim_obj(goi->interp, o_t);
if (tap == NULL) { if (tap == NULL) {
return JIM_ERR; return JIM_ERR;
} }