Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning objects with static storage duration a zero value is redundant #446

Open
wants to merge 1 commit into
base: pu
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/day.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
#include "calcurse.h"

static vector_t day_items;
static unsigned day_items_nb = 0;
static unsigned day_items_nb;

struct day_item empty_day = { 0, 0, 0, {NULL}};
struct day_item empty_day;

/*
* The day vector, day_items, is continuously rebuilt for display as the
Expand All @@ -54,7 +54,7 @@ struct day_item empty_day = { 0, 0, 0, {NULL}};
* here that may later be used to refind the item in the rebuilt day
* vector.
*/
static struct day_item sel_data = { 0, 0, 0, {NULL}};
static struct day_item sel_data;

/*
* Save the item to become the selected APP item.
Expand Down
2 changes: 1 addition & 1 deletion src/ui-todo.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "calcurse.h"
#include <ctype.h>

static unsigned ui_todo_view = 0;
static unsigned ui_todo_view;

static struct todo *ui_todo_selitem(void)
{
Expand Down
34 changes: 17 additions & 17 deletions src/vars.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
/*
* variables to store window size
*/
int col = 0, row = 0;
int resize = 0;
int col, row;
int resize;

/* variable to tell if the terminal supports color */
unsigned colorize = 0;
unsigned colorize;

/* Default background and foreground colors. */
int foreground, background;
Expand All @@ -59,13 +59,13 @@ int foreground, background;
enum ui_mode ui_mode = UI_CMDLINE;

/* Don't save anything if this is set. */
int read_only = 0;
int read_only;

/* Hide import/export message if set. */
int quiet = 0;
int quiet;

/* Applications can trigger a reload by sending SIGUSR1. */
int want_reload = 0;
int want_reload;

/* Strings describing each input date format. */
const char *datefmt_str[DATE_FORMATS];
Expand All @@ -79,17 +79,17 @@ int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
* variables to store data path names, which are initialized in
* io_init()
*/
char *path_ddir = NULL;
char *path_cdir = NULL;
char *path_todo = NULL;
char *path_apts = NULL;
char *path_conf = NULL;
char *path_notes = NULL;
char *path_keys = NULL;
char *path_cpid = NULL;
char *path_dpid = NULL;
char *path_dmon_log = NULL;
char *path_hooks = NULL;
char *path_ddir;
char *path_cdir;
char *path_todo;
char *path_apts;
char *path_conf;
char *path_notes;
char *path_keys;
char *path_cpid;
char *path_dpid;
char *path_dmon_log;
char *path_hooks;

/* Variable to store global configuration. */
struct conf conf;
Expand Down