g_file_get_contents(path, &contents, NULL, &error);
if( error ) {
- g_warning("GError: '%s'\n", error->message);
+ g_warning("GError: '%s'", error->message);
g_error_free(error);
}
if( contents != NULL ) {
lines = strsplit_no_copy(contents, '\n');
} else {
- g_warning("Badly formatted file found, ignoring: '%s'\n", path);
+ g_warning("Badly formatted file found, ignoring: '%s'", path);
return NULL;
}
/* Last-Seen timestamp */
if( !strcmp(line[0], "X-RSSyl-Last-Seen") ) {
ctx->last_seen = atol(line[1]);
- debug_print("RSSyl: got last_seen timestamp %ld\n", ctx->last_seen);
+ debug_print("RSSyl: got last_seen timestamp %lld\n", (long long)ctx->last_seen);
}
/* ID */
FeedItem *item = (FeedItem *)data;
RFeedCtx *ctx = (RFeedCtx *)item->data;
- if( ctx != NULL && ctx->path != NULL)
+ if( ctx != NULL && ctx->path != NULL) {
g_free(ctx->path);
+ g_free(ctx);
+ }
feed_item_free(item);
}
gchar *path = NULL, *fname = NULL;
GDir *dp;
const gchar *d;
- GError *error;
+ GError *error = NULL;
gint num;
FeedItem *item = NULL;
RFeedCtx *ctx;
ritem->last_update = 0;
if( (dp = g_dir_open(path, 0, &error)) == NULL ) {
- FILE_OP_ERROR(path, "g_dir_open");
debug_print("g_dir_open on \"%s\" failed with error %d (%s)\n",
path, error->code, error->message);
g_error_free(error);