aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
diff options
context:
space:
mode:
Diffstat (limited to 'modules/devices')
-rw-r--r--modules/devices/arm/processor.c5
-rw-r--r--modules/devices/riscv/processor.c1
-rw-r--r--modules/devices/riscv/riscv_data.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/modules/devices/arm/processor.c b/modules/devices/arm/processor.c
index 9446108d..23e54934 100644
--- a/modules/devices/arm/processor.c
+++ b/modules/devices/arm/processor.c
@@ -229,7 +229,6 @@ static gint cmp_cpufreq_data(cpufreq_data *a, cpufreq_data *b) {
}
static gint cmp_cpufreq_data_ignore_affected(cpufreq_data *a, cpufreq_data *b) {
- gint i = 0;
cmp_clocks_test(cpukhz_max);
cmp_clocks_test(cpukhz_min);
return 0;
@@ -239,10 +238,10 @@ gchar *clocks_summary(GSList * processors)
{
gchar *ret = g_strdup_printf("[%s]\n", _("Clocks"));
GSList *all_clocks = NULL, *uniq_clocks = NULL;
- GSList *tmp, *l;
+ GSList *l;
Processor *p;
cpufreq_data *c, *cur = NULL;
- gint cur_count = 0, i = 0;
+ gint cur_count = 0;
/* create list of all clock references */
for (l = processors; l; l = l->next) {
diff --git a/modules/devices/riscv/processor.c b/modules/devices/riscv/processor.c
index cd8da4c7..ee7f48c7 100644
--- a/modules/devices/riscv/processor.c
+++ b/modules/devices/riscv/processor.c
@@ -33,7 +33,6 @@ processor_scan(void)
FILE *cpuinfo;
gchar buffer[128];
gchar *rep_pname = NULL;
- gchar *tmpfreq_str = NULL;
GSList *pi = NULL;
cpuinfo = fopen(PROC_CPUINFO, "r");
diff --git a/modules/devices/riscv/riscv_data.c b/modules/devices/riscv/riscv_data.c
index 526067d3..5af20103 100644
--- a/modules/devices/riscv/riscv_data.c
+++ b/modules/devices/riscv/riscv_data.c
@@ -174,7 +174,7 @@ static int riscv_isa_next(const char *isap, char *flag) {
#define FSTR_SIZE 1024
#define RV_CHECK_FOR(e) ( strncasecmp(ps, e, 2) == 0 )
-#define ADD_EXT_FLAG(ext) el = strlen(ext); strncpy(pd, ext, el); strncpy(pd + el, " ", 1); pd += el + 1;
+#define ADD_EXT_FLAG(ext) el = strlen(ext); strncpy(pd, ext, el); pd[el]=' '; pd[el+1]=0; pd += el + 1;
char *riscv_isa_to_flags(const char *isa) {
char *flags = NULL, *ps = (char*)isa, *pd = NULL;
char flag_buf[64] = "";