projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* sys-file-info.c: (cmd_display) Use compare_var_ptr_names to
[pspp]
/
src
/
language
/
expressions
/
optimize.c
diff --git
a/src/language/expressions/optimize.c
b/src/language/expressions/optimize.c
index c5ba6224dfd0f07c00db74c0bf8e00415fa9d15f..d80f4069b87a4cbfe1e7155f9ff3d4c8684a9848 100644
(file)
--- a/
src/language/expressions/optimize.c
+++ b/
src/language/expressions/optimize.c
@@
-24,6
+24,7
@@
#include <errno.h>
#include <stdlib.h>
#include <libpspp/alloc.h>
#include <errno.h>
#include <stdlib.h>
#include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
#include <data/calendar.h>
#include <data/data-in.h>
#include <libpspp/message.h>
#include <data/calendar.h>
#include <data/data-in.h>
#include <libpspp/message.h>
@@
-44,7
+45,7
@@
expr_optimize (union any_node *node, struct expression *e)
{
int nonconst_cnt = 0; /* Number of nonconstant children. */
int sysmis_cnt = 0; /* Number of system-missing children. */
{
int nonconst_cnt = 0; /* Number of nonconstant children. */
int sysmis_cnt = 0; /* Number of system-missing children. */
- struct operation *op;
+
const
struct operation *op;
struct composite_node *c;
int i;
struct composite_node *c;
int i;
@@
-157,12
+158,10
@@
evaluate_tree (struct composite_node *node, struct expression *e)
#include "optimize.inc"
default:
#include "optimize.inc"
default:
-
assert (0
);
+
NOT_REACHED (
);
}
}
- /* Not reached. */
- assert (0);
- abort ();
+ NOT_REACHED ();
}
static double
}
static double
@@
-302,14
+301,14
@@
flatten_atom (union any_node *n, struct expression *e)
break;
default:
break;
default:
-
abort
();
+
NOT_REACHED
();
}
}
static void
flatten_composite (union any_node *n, struct expression *e)
{
}
}
static void
flatten_composite (union any_node *n, struct expression *e)
{
- struct operation *op = &operations[n->type];
+
const
struct operation *op = &operations[n->type];
size_t i;
for (i = 0; i < n->composite.arg_cnt; i++)
size_t i;
for (i = 0; i < n->composite.arg_cnt; i++)
@@
-363,7
+362,7
@@
flatten_node (union any_node *n, struct expression *e)
else if (is_composite (n->type))
flatten_composite (n, e);
else
else if (is_composite (n->type))
flatten_composite (n, e);
else
-
abort
();
+
NOT_REACHED
();
}
static union operation_data *
}
static union operation_data *