Skip to content

Commit

Permalink
Add missing typedef keyword
Browse files Browse the repository at this point in the history
Without this keyword these struct definitions are considered by GCC as a
variable definition.

This was catched because there is a more strict check about these
variable definitions since GCC 10:

* https://gcc.gnu.org/gcc-10/porting_to.html#common

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
  • Loading branch information
lemenkov authored and razvancrainea committed Feb 11, 2020
1 parent 70d0e62 commit 1f42660
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/cachedb_local/cachedb_local_replication.h
Expand Up @@ -34,10 +34,10 @@ extern struct clusterer_binds clusterer_api;
extern str cache_repl_cap;
extern int cluster_id;

enum cachedb_rr_persist {
typedef enum cachedb_rr_persist {
RRP_NONE,
RRP_SYNC_FROM_CLUSTER,
} rr_persist_t;
} cachedb_rr_persist_t;

void receive_binary_packet(bin_packet_t *packet);
void receive_cluster_event(enum clusterer_event ev, int node_id);
Expand Down
6 changes: 3 additions & 3 deletions modules/usrloc/ul_mod.h
Expand Up @@ -44,7 +44,7 @@ extern enum ul_sql_write_mode sql_wmode;
extern enum ul_pinging_mode pinging_mode;

/* manner in which node data should be restored (or not) following a restart */
enum ul_rr_persist {
typedef enum ul_rr_persist {
RRP_NONE,
RRP_LOAD_FROM_SQL,
RRP_SYNC_FROM_CLUSTER,
Expand All @@ -53,14 +53,14 @@ enum ul_rr_persist {

/* if using SQL for restart persistency,
* should runtime SQL blocking writes be performed eagerly or lazily? */
enum ul_sql_write_mode {
typedef enum ul_sql_write_mode {
SQL_NO_WRITE,
SQL_WRITE_THROUGH,
SQL_WRITE_BACK,
} ul_sql_write_mode_t;
#define bad_sql_write_mode(wm) ((wm) < SQL_NO_WRITE || (wm) > SQL_WRITE_BACK)

enum ul_pinging_mode {
typedef enum ul_pinging_mode {
PMD_OWNERSHIP,
PMD_COOPERATION,
} ul_pinging_mode_t;
Expand Down
2 changes: 1 addition & 1 deletion modules/usrloc/usrloc.h
Expand Up @@ -36,7 +36,7 @@
#include "ul_callback.h"
#include "ul_dbg.h"

enum ul_cluster_mode {
typedef enum ul_cluster_mode {
CM_NONE,
CM_FEDERATION,
CM_FEDERATION_CACHEDB,
Expand Down

0 comments on commit 1f42660

Please sign in to comment.