Skip to content

Commit

Permalink
fix warnings in msrsave
Browse files Browse the repository at this point in the history
  • Loading branch information
slabasan committed Oct 25, 2024
1 parent 7ce8537 commit c7fd90f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions msrsave/msrsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static int msr_parse_allowlist(const char *allowlist_path, size_t *num_msr_ptr,
enum {BUFFER_SIZE = 8192};
int err = 0;
int tmp_err = 0;
int i;
size_t i;
int tmp_fd = -1;
int allowlist_fd = -1;
size_t num_scan = 0;
Expand All @@ -53,7 +53,6 @@ static int msr_parse_allowlist(const char *allowlist_path, size_t *num_msr_ptr,
uint64_t *msr_mask = NULL;
struct stat allowlist_stat;
char tmp_path[NAME_MAX] = "/tmp/msrsave_allowlist_XXXXXX";
char err_msg[NAME_MAX];
char copy_buffer[BUFFER_SIZE];

/* Copy allowlist into temporary file */
Expand Down Expand Up @@ -253,7 +252,7 @@ static int msr_parse_allowlist(const char *allowlist_path, size_t *num_msr_ptr,
return err;
}

int msr_save(const char *save_path, const char *allowlist_path, const char *msr_path_format, int num_cpu, FILE *output_log, FILE *error_log)
int msr_save(const char *save_path, const char *allowlist_path, const char *msr_path_format, int num_cpu, FILE *error_log)
{
int err = 0;
int tmp_err = 0;
Expand Down Expand Up @@ -407,7 +406,6 @@ int msr_restore(const char *restore_path, const char *allowlist_path, const char
FILE *restore_fid = NULL;
struct stat restore_stat;
struct stat allowlist_stat;
char err_msg[NAME_MAX];

err = msr_parse_allowlist(allowlist_path, &num_msr, &msr_offset, &msr_mask, error_log);
if (err)
Expand Down
1 change: 0 additions & 1 deletion msrsave/msrsave.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ int msr_save(const char *out_path,
const char *allowlist_path,
const char *msr_path,
int num_cpu,
FILE *output_log,
FILE *error_log);

int msr_restore(const char *in_path,
Expand Down

0 comments on commit c7fd90f

Please sign in to comment.