Skip to content
Snippets Groups Projects
Commit 61ab4f25 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Fix uninitialized value

reported when compiling with optimizations (-O2). field_id may be
uninitialized or the the value from the previous iteration in the while
loop. The only possible values of dataset_loc->type are:

typedef enum {
	PROFILE_FIELD_NOT_SET,
	PROFILE_FIELD_UINT64,
	PROFILE_FIELD_DOUBLE
} acct_gather_profile_field_type_t;

and the while loop condition ensures that PROFILE_FIELD_NOT_SET is not
handled. So instead of handling PROFILE_FIELD_NOT_SET directly, just
catching everything else with the "default" case statement and
continuing the loop.
parent a59fef53
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment