Project

General

Profile

Actions

Bug #4816

closed

osmo-bts has rate_ctr_desc definitions in header file

Added by laforge over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
10/18/2020
Due date:
% Done:

100%

Spec Reference:

Description

a header file should only contain declarations, not entire definitions.

The fact that we have constructs like

static const struct rate_ctr_desc bts_ctr_description[] = {
       [BTS_CTR_CHREQ_TOTAL] =                 {"chreq:total", "Received channel requests"},

in a header file means that very C file including this header file will get its own private copy of the entire definition.

The header file should only include this declaration:

extern const struct rate_ctr_desc bts_ctr_description[];

and the actual non-static definition should be in a C file.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)