aboutsummaryrefslogtreecommitdiff
path: root/src/presentation.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2018-10-30 18:07:47 +0100
committerThomas White <taw@bitwiz.me.uk>2018-10-30 18:07:47 +0100
commit91f680b08931aaa43df551d18fdd4b6638fbac7b (patch)
tree250c45ab354dd55a67f8a7fe0507a80127f0e1b7 /src/presentation.c
parent19f20ab06476f93977d1c7130b76f7c31d198936 (diff)
Fix style warnings from static analyser
Diffstat (limited to 'src/presentation.c')
-rw-r--r--src/presentation.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/presentation.c b/src/presentation.c
index e1df7c8..fd55bf7 100644
--- a/src/presentation.c
+++ b/src/presentation.c
@@ -41,17 +41,11 @@
void free_presentation(struct presentation *p)
{
- int final = 0;
-
/* FIXME: Loads of stuff leaks here */
g_object_unref(p->file);
g_object_unref(p->stylesheet_from);
imagestore_destroy(p->is);
free(p);
-
- if ( final ) {
- gtk_main_quit();
- }
}
@@ -69,13 +63,11 @@ char *get_titlebar_string(struct presentation *p)
static void find_and_load_stylesheet(struct presentation *p, GFile *file)
{
GFile *ssfile;
- GFile *parent;
- gchar *ssuri;
if ( file != NULL ) {
/* First choice: /same/directory/<presentation>.ss */
- ssuri = g_file_get_uri(file);
+ gchar *ssuri = g_file_get_uri(file);
if ( ssuri != NULL ) {
size_t l = strlen(ssuri);
if ( ssuri[l-3] == '.' && ssuri[l-2] == 's' && ssuri[l-1] =='c' ) {
@@ -89,7 +81,7 @@ static void find_and_load_stylesheet(struct presentation *p, GFile *file)
/* Second choice: /same/directory/stylesheet.ss */
if ( p->stylesheet == NULL ) {
- parent = g_file_get_parent(file);
+ GFile *parent = g_file_get_parent(file);
if ( parent != NULL ) {
ssfile = g_file_get_child(parent, "stylesheet.ss");
if ( ssfile != NULL ) {