diff options
-rw-r--r-- | idlestat.c | 8 | ||||
-rw-r--r-- | reports.c | 8 |
2 files changed, 16 insertions, 0 deletions
@@ -900,6 +900,14 @@ struct cpuidle_datas *idlestat_load(const char *filename) const struct trace_ops **ops_it; int ret; + /* + * The linker places pointers to all entries declared with + * EXPORT_TRACE_OPS into a special segment. This creates + * an array of pointers preceded by trace_ops_head. Let + * the static analysis tool know that we know what we are + * doing. + */ + /* coverity[array_vs_singleton] */ for (ops_it = (&trace_ops_head)+1 ; *ops_it ; ++ops_it) { assert((*ops_it)->name); assert((*ops_it)->check_magic); @@ -34,6 +34,14 @@ void list_report_formats_to_stderr(void) { const struct report_ops **ops_it; + /* + * The linker places pointers to all entries declared with + * EXPORT_REPORT_OPS into a special segment. This creates + * an array of pointers preceded by report_ops_head. Let + * the static analysis tool know that we know what we are + * doing. + */ + /* coverity[array_vs_singleton] */ for (ops_it = (&report_ops_head)+1 ; *ops_it ; ++ops_it) fprintf(stderr, " %s", (*ops_it)->name); |