[dia] [warningectomy] ignoring return value of 'fscanf'
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [warningectomy] ignoring return value of 'fscanf'
- Date: Sat, 4 May 2013 18:59:55 +0000 (UTC)
commit a6d27577c1ef5a4a531ae5fbb98cbf333ee7ffc0
Author: Hans Breuer <hans breuer org>
Date: Sat May 4 13:22:47 2013 +0200
[warningectomy] ignoring return value of 'fscanf'
not anymore, now adding a note to the error context
plug-ins/xfig/xfig-import.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/xfig/xfig-import.c b/plug-ins/xfig/xfig-import.c
index 5d848dd..1f637b6 100644
--- a/plug-ins/xfig/xfig-import.c
+++ b/plug-ins/xfig/xfig-import.c
@@ -249,8 +249,9 @@ fig_read_n_points(FILE *file, int n, Point **points, DiaContext *ctx)
p.y = y/FIG_UNIT;
g_array_append_val(points_list, p);
}
- fscanf(file, "\n");
-
+ if (fscanf(file, "\n") == EOF)
+ dia_context_add_message (ctx, _("Unexpected end of file."));
+
*points = (Point *)points_list->data;
g_array_free(points_list, FALSE);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]