summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-11 20:44:30 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-11 20:44:30 -0700
commite80e6a01a6396679e5293ec0b8b41c8c7378ea48 (patch)
tree05944e50f9aba50c265d99743eeccb4f1bf7ba1d /src
parent205350e6adfb7548d68680cd1dea0760b1fd8bd7 (diff)
downloadvyatta-cfg-e80e6a01a6396679e5293ec0b8b41c8c7378ea48.tar.gz
vyatta-cfg-e80e6a01a6396679e5293ec0b8b41c8c7378ea48.zip
Fix compiler warnings in commit2
Add headers with prototypes to remove compiler warnings Make some obvious tables const to avoid any bugs.
Diffstat (limited to 'src')
-rw-r--r--src/commit2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/commit2.c b/src/commit2.c
index e6b63fa..bf5957d 100644
--- a/src/commit2.c
+++ b/src/commit2.c
@@ -2,16 +2,18 @@
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
+#include <string.h>
#include <sys/time.h>
#include <glib-2.0/glib.h>
#include "common/common.h"
+#include "cli_path_utils.h"
boolean g_debug = FALSE;
boolean g_display_error_node = FALSE;
boolean g_coverage = FALSE;
boolean g_dump_trans = FALSE;
-int ActionOrder[top_act] = {
+const int ActionOrder[top_act] = {
4,
5,
6,
@@ -24,7 +26,7 @@ int ActionOrder[top_act] = {
-char* ActionNames[top_act] = {
+const char* ActionNames[top_act] = {
"delete", //0
"create", //1
"activate", //2
@@ -81,7 +83,7 @@ also, the algorithm for collapsing the tree into a transaction list is:
*
**/
void
-usage()
+usage(void)
{
printf("commit2\n");
printf("\t-d\t\tdebug mode\n");