build: Fix warnings.

As compilers get smarter, the devs get...TBC
This commit is contained in:
Alastair Poole 2020-08-11 17:26:22 +01:00
parent 702eb3dacd
commit 65b1330a47
3 changed files with 9 additions and 9 deletions

View File

@ -53,7 +53,7 @@ _item_menu_edit_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EI
static Evas_Object * static Evas_Object *
_image_menu_create(const char *path) _image_menu_create(const char *path)
{ {
Elm_Object_Item *menu_it, *menu_it2; Elm_Object_Item *menu_it;
Evas_Object *menu; Evas_Object *menu;
_image_path = path; _image_path = path;
@ -61,9 +61,9 @@ _image_menu_create(const char *path)
menu = elm_menu_add(edi_main_win_get()); menu = elm_menu_add(edi_main_win_get());
menu_it = elm_menu_item_add(menu, NULL, "edit", _("Edit with..."), NULL, NULL); menu_it = elm_menu_item_add(menu, NULL, "edit", _("Edit with..."), NULL, NULL);
if (ecore_file_app_installed("gimp")) if (ecore_file_app_installed("gimp"))
menu_it2 = elm_menu_item_add(menu, menu_it, "gimp", _("Gimp"), _item_menu_edit_cb, "gimp"); elm_menu_item_add(menu, menu_it, "gimp", _("Gimp"), _item_menu_edit_cb, "gimp");
if (ecore_file_app_installed("inkscape")) if (ecore_file_app_installed("inkscape"))
menu_it2 = elm_menu_item_add(menu, menu_it, "inkscape", _("Inkscape"), _item_menu_edit_cb, "inkscape"); elm_menu_item_add(menu, menu_it, "inkscape", _("Inkscape"), _item_menu_edit_cb, "inkscape");
return menu; return menu;
} }

View File

@ -1197,7 +1197,7 @@ static void
_edi_menu_scm_commit_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, _edi_menu_scm_commit_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED) void *event_info EINA_UNUSED)
{ {
char *workdir = getcwd(NULL, PATH_MAX); char *workdir = getcwd(NULL, 0);
if (!_edi_project_credentials_check()) if (!_edi_project_credentials_check())
{ {

View File

@ -25,7 +25,7 @@ _edi_scm_exec(const char *command)
if (!self) return -1; if (!self) return -1;
oldpwd = getcwd(NULL, PATH_MAX); oldpwd = getcwd(NULL, 0);
chdir(self->root_directory); chdir(self->root_directory);
code = edi_exe_wait(command); code = edi_exe_wait(command);
@ -44,7 +44,7 @@ _edi_scm_exec_response(const char *command)
if (!self) return NULL; if (!self) return NULL;
oldpwd = getcwd(NULL, PATH_MAX); oldpwd = getcwd(NULL, 0);
chdir(self->root_directory); chdir(self->root_directory);
response = edi_exe_response(command); response = edi_exe_response(command);
@ -61,7 +61,7 @@ edi_scm_git_new(void)
int code; int code;
char *oldpwd; char *oldpwd;
oldpwd = getcwd(NULL, PATH_MAX); oldpwd = getcwd(NULL, 0);
chdir(edi_project_get()); chdir(edi_project_get());
code = edi_exe_wait("git init ."); code = edi_exe_wait("git init .");
@ -95,7 +95,7 @@ edi_scm_git_update(const char *dir)
char *oldpwd; char *oldpwd;
int code; int code;
oldpwd = getcwd(NULL, PATH_MAX); oldpwd = getcwd(NULL, 0);
chdir(dir); chdir(dir);
code = edi_exe_wait("git fetch origin && git reset --hard origin/master"); code = edi_exe_wait("git fetch origin && git reset --hard origin/master");
@ -921,7 +921,7 @@ edi_scm_init(void)
if (edi_project_get()) if (edi_project_get())
return edi_scm_init_path(edi_project_get()); return edi_scm_init_path(edi_project_get());
cwd = getcwd(NULL, PATH_MAX); cwd = getcwd(NULL, 0);
engine = edi_scm_init_path(cwd); engine = edi_scm_init_path(cwd);
free(cwd); free(cwd);
return engine; return engine;