gprofng: fix cppcheck warnings

gprofng/ChangeLog
2022-09-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* common/hwcdrv.c: Fix cppcheck warning.
	* src/ABS.h: Likewise.
	* src/CompCom.cc: Likewise.
This commit is contained in:
Vladimir Mezentsev 2022-09-29 13:30:42 -07:00
parent 1d4c108cec
commit 0d94a87350
3 changed files with 3 additions and 3 deletions

View File

@ -696,7 +696,7 @@ init_perf_event (struct perf_event_attr *hw, uint64_t event, uint64_t period)
#endif
hw->sample_period = period;
hw->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_READ |
hw->sample_type = PERF_SAMPLE_IP |
// PERF_SAMPLE_TID |
// PERF_SAMPLE_TIME | // possibly interesting
// PERF_SAMPLE_ADDR |

View File

@ -53,7 +53,7 @@ extern char *ABS_PP_CODES[NUM_ABS_PP_CODES];
/* dbe should check HWC values for errors */
#define HWCVAL_ERR_FLAG (1ULL<<63)
#define HWCVAL_SET_ERR(ctr) ((ctr) | HWCVAL_ERR_FLAG)
#define HWCVAL_HAS_ERR(ctr) ((ctr) & HWCVAL_ERR_FLAG ? 1 : 0)
#define HWCVAL_HAS_ERR(ctr) (((ctr) & HWCVAL_ERR_FLAG) != 0)
#define HWCVAL_CLR_ERR(ctr) ((ctr) & ~HWCVAL_ERR_FLAG)
#define ABS_GET_RT_CODE(EA) ((EA) & 0x0FLL)

View File

@ -305,7 +305,7 @@ CompComment::compcom_format (int index, compmsg *msg, int &visible)
for (int i = 0; i < plist_idx - 1; i++)
{
prim_ty = ccm_param_primtype (msg->msg_type, i + 1);
if (prim_ty == CCM_PRIMTYPE_STRING || prim_ty == CCM_PRIMTYPE_STRING)
if (prim_ty == CCM_PRIMTYPE_STRING)
free (parms[i]);
}
}