Hi all,

When compiling the Subversion 1.7 code with the GCC(4.2.1) with compiler option "-pedantic", compilation fails
with an error " comma at the end of enumerator list".

Here is the snip:

<snip>

In file included from main.cc:1:
/opt/local/include/subversion-1/svn_wc.h:1210: error: comma at end of enumerator list
make: *** [main] Error 1

</snip>

Not sure if the trailing commas at the end of enumerator lists are typos, though fixing quite a few of them
in the patch attached. I have also attached the log message with this mail.
Please share your views.



Thanks and regards
Prabhu
Index: subversion/svn/main.c
===================================================================
--- subversion/svn/main.c	(revision 1189618)
+++ subversion/svn/main.c	(working copy)
@@ -123,7 +123,7 @@
   opt_diff,
   opt_internal_diff,
   opt_use_git_diff_format,
-  opt_allow_mixed_revisions,
+  opt_allow_mixed_revisions
 } svn_cl__longopt_t;
 
 
Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h	(revision 1189618)
+++ subversion/include/svn_wc.h	(working copy)
@@ -1219,7 +1219,7 @@
 
   /** The operation skipped the path because it was conflicted.
    * @since New in 1.7. */
-  svn_wc_notify_skip_conflicted,
+  svn_wc_notify_skip_conflicted
 
 } svn_wc_notify_action_t;
 
Index: subversion/libsvn_ra_serf/merge.c
===================================================================
--- subversion/libsvn_ra_serf/merge.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/merge.c	(working copy)
@@ -60,14 +60,14 @@
   DATE,
   IGNORE_PROP_NAME,
   NEED_PROP_NAME,
-  PROP_VAL,
+  PROP_VAL
 } merge_state_e;
 
 typedef enum resource_type_e {
   UNSET,
   BASELINE,
   COLLECTION,
-  CHECKED_IN,
+  CHECKED_IN
 } resource_type_e;
 
 typedef struct merge_info_t {
Index: subversion/libsvn_ra_serf/locks.c
===================================================================
--- subversion/libsvn_ra_serf/locks.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/locks.c	(working copy)
@@ -55,7 +55,7 @@
   DEPTH,
   TIMEOUT,
   LOCK_TOKEN,
-  COMMENT,
+  COMMENT
 } lock_state_e;
 
 typedef struct lock_prop_info_t {
Index: subversion/libsvn_ra_serf/getlocks.c
===================================================================
--- subversion/libsvn_ra_serf/getlocks.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/getlocks.c	(working copy)
@@ -55,7 +55,7 @@
   OWNER,
   COMMENT,
   CREATION_DATE,
-  EXPIRATION_DATE,
+  EXPIRATION_DATE
 } lock_state_e;
 
 typedef struct lock_info_t {
Index: subversion/libsvn_ra_serf/getdate.c
===================================================================
--- subversion/libsvn_ra_serf/getdate.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/getdate.c	(working copy)
@@ -48,7 +48,7 @@
  */
 typedef enum date_state_e {
   NONE = 0,
-  VERSION_NAME,
+  VERSION_NAME
 } date_state_e;
 
 typedef struct date_info_t {
Index: subversion/libsvn_ra_serf/blame.c
===================================================================
--- subversion/libsvn_ra_serf/blame.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/blame.c	(working copy)
@@ -54,7 +54,7 @@
   SET_PROP,
   REMOVE_PROP,
   MERGED_REVISION,
-  TXDELTA,
+  TXDELTA
 } blame_state_e;
 
 typedef struct blame_info_t {
Index: subversion/libsvn_ra_serf/log.c
===================================================================
--- subversion/libsvn_ra_serf/log.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/log.c	(working copy)
@@ -61,7 +61,7 @@
   REPLACED_PATH,
   DELETED_PATH,
   MODIFIED_PATH,
-  SUBTRACTIVE_MERGE,
+  SUBTRACTIVE_MERGE
 } log_state_e;
 
 typedef struct log_info_t {
Index: subversion/libsvn_ra_serf/get_deleted_rev.c
===================================================================
--- subversion/libsvn_ra_serf/get_deleted_rev.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/get_deleted_rev.c	(working copy)
@@ -37,7 +37,7 @@
  */
 typedef enum drev_state_e {
   NONE = 0,
-  VERSION_NAME,
+  VERSION_NAME
 } drev_state_e;
 
 typedef struct drev_context_t {
Index: subversion/libsvn_ra_serf/update.c
===================================================================
--- subversion/libsvn_ra_serf/update.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/update.c	(working copy)
@@ -68,7 +68,7 @@
     ADD_FILE,
     PROP,
     IGNORE_PROP_NAME,
-    NEED_PROP_NAME,
+    NEED_PROP_NAME
 } report_state_e;
 
 
Index: subversion/libsvn_ra_serf/property.c
===================================================================
--- subversion/libsvn_ra_serf/property.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/property.c	(working copy)
@@ -43,7 +43,7 @@
   NONE = 0,
   RESPONSE,
   PROP,
-  PROPVAL,
+  PROPVAL
 } prop_state_e;
 
 typedef struct prop_info_t {
Index: subversion/libsvn_ra_serf/options.c
===================================================================
--- subversion/libsvn_ra_serf/options.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/options.c	(working copy)
@@ -51,7 +51,7 @@
 typedef enum options_state_e {
   OPTIONS,
   ACTIVITY_COLLECTION,
-  HREF,
+  HREF
 } options_state_e;
 
 typedef struct options_state_list_t {
Index: subversion/libsvn_ra_serf/getlocations.c
===================================================================
--- subversion/libsvn_ra_serf/getlocations.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/getlocations.c	(working copy)
@@ -43,7 +43,7 @@
  */
 typedef enum loc_state_e {
   REPORT,
-  LOCATION,
+  LOCATION
 } loc_state_e;
 
 typedef struct loc_state_list_t {
Index: subversion/libsvn_ra_serf/replay.c
===================================================================
--- subversion/libsvn_ra_serf/replay.c	(revision 1189618)
+++ subversion/libsvn_ra_serf/replay.c	(working copy)
@@ -55,7 +55,7 @@
   ADD_FILE,
   DELETE_ENTRY,
   APPLY_TEXTDELTA,
-  CHANGE_PROP,
+  CHANGE_PROP
 } replay_state_e;
 
 typedef struct replay_info_t replay_info_t;
Index: subversion/svnsync/main.c
===================================================================
--- subversion/svnsync/main.c	(revision 1189618)
+++ subversion/svnsync/main.c	(working copy)
@@ -67,7 +67,7 @@
   svnsync_opt_version,
   svnsync_opt_trust_server_cert,
   svnsync_opt_allow_non_empty,
-  svnsync_opt_steal_lock,
+  svnsync_opt_steal_lock
 };
 
 #define SVNSYNC_OPTS_DEFAULT svnsync_opt_non_interactive, \
Index: subversion/svnrdump/svnrdump.c
===================================================================
--- subversion/svnrdump/svnrdump.c	(revision 1189618)
+++ subversion/svnrdump/svnrdump.c	(working copy)
@@ -80,7 +80,7 @@
     opt_non_interactive,
     opt_incremental,
     opt_trust_server_cert,
-    opt_version,
+    opt_version
   };
 
 #define SVN_SVNRDUMP__BASE_OPTIONS opt_config_dir, \
Compiling the code with GCC(4.2.1) with the compiler option "-pedantic" fails
with an error "comma at the end of enumerator list".

* subversion/svn/main.c
* subversion/include/svn_wc.h
* subversion/libsvn_ra_serf/merge.c
* subversion/libsvn_ra_serf/locks.c
* subversion/libsvn_ra_serf/getlocks.c
* subversion/libsvn_ra_serf/getdate.c
* subversion/libsvn_ra_serf/blame.c
* subversion/libsvn_ra_serf/log.c
* subversion/libsvn_ra_serf/get_deleted_rev.c
* subversion/libsvn_ra_serf/update.c
* subversion/libsvn_ra_serf/property.c
* subversion/libsvn_ra_serf/options.c
* subversion/libsvn_ra_serf/getlocations.c
* subversion/libsvn_ra_serf/replay.c
* subversion/svnsync/main.c
* subversion/svnrdump/svnrdump.c

  Fixed the trailing commas at the end of the enumerator lists.
  Not sure if they are typos.

Found by: Peter Johansson <peterandrejohansson{_AT_}gmail.com>
Patch by: Prabhu Gnana Sundar <prabhugs{_AT_}collab.net>

Reply via email to