Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] deprecated use of label at end of compound statement
Home

[Freeciv-Dev] deprecated use of label at end of compound statement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] deprecated use of label at end of compound statement
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 19 Jan 2001 19:53:58 +0100

Hi,

gcc warns:

diptreaty.c: In function `add_clause':
diptreaty.c:110: warning: deprecated use of label at end of compound statement

and I think ages ago somebody reported actually having a compiler that
barfed on this. So I suggest this patch:

--- diptreaty.c~        Fri Jan 19 19:14:22 2001
+++ diptreaty.c Fri Jan 19 19:17:39 2001
@@ -106,7 +106,6 @@
         return 1;
       }
       break;
-    default:
     }
   }
    
--- diplhand.c~ Fri Jan 19 19:14:29 2001
+++ diplhand.c  Fri Jan 19 19:23:07 2001
@@ -153,7 +153,6 @@
            return;
          }
          break;
-       default:
        }
       }
     }
@@ -236,7 +235,6 @@
            goto cleanup;
          }
          break;
-       default:
        }
       }
     }


Actually, perhaps there should rather be default cases with
aborts. (Wish this was the default for C like in Modula 3...)

        Falk



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] deprecated use of label at end of compound statement, Falk Hueffner <=