From 697c1522fb474a5e0ea26ddcd2f812ed8ea353eb Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 9 Aug 2012 12:07:53 +0100 Subject: [PATCH 1/2] dtcalc: warning prevention, do not use NULL when you mean 0. --- cde/programs/dtcalc/calctool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtcalc/calctool.c b/cde/programs/dtcalc/calctool.c index 41d399b4c..b0d2ce9a8 100644 --- a/cde/programs/dtcalc/calctool.c +++ b/cde/programs/dtcalc/calctool.c @@ -416,7 +416,7 @@ char **argv ; srand48((long) time((time_t *) 0)) ; /* Seed random number generator. */ make_items() ; /* Create server images and fir frames. */ - if(v->display[0] == NULL) + if(v->display[0] == 0) do_clear() ; /* Initialise and clear display. */ if (v->rstate == TRUE) /* Show the memory register window? */ @@ -941,7 +941,7 @@ init_vars() /* Setup default values for various variables. */ v->key_exp = 0 ; /* Not entering an exponent number. */ v->pending_op = 0 ; /* No pending arithmetic operation. */ v->titleline = NULL ; /* No User supplied title line. */ - v->display[0] = NULL ; + v->display[0] = 0 ; v->x = 0; v->x = 0; From d2e1f3158bf0887131d243f18f7e01995d09fb05 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 9 Aug 2012 12:08:46 +0100 Subject: [PATCH 2/2] dtcalc: warning prevention, add include for prototype of free() --- cde/programs/dtcalc/ds_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cde/programs/dtcalc/ds_common.c b/cde/programs/dtcalc/ds_common.c index 7a51d65f2..9b1ec6844 100644 --- a/cde/programs/dtcalc/ds_common.c +++ b/cde/programs/dtcalc/ds_common.c @@ -33,6 +33,7 @@ */ #include +#include #include "ds_common.h" #define FREE (void) free