aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-01 13:25:55 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-01 13:25:55 +0800
commitfe5f4526f7c2ef14b2e1c8703eb5899764793dcf (patch)
tree51c3710d36cacd17e7b3e851d3f7653d29c47dad
parent9753d2452e66348c7349ef92bfdc256cad48245f (diff)
downloadfreebsd-ports-gnome-fe5f4526f7c2ef14b2e1c8703eb5899764793dcf.tar.gz
freebsd-ports-gnome-fe5f4526f7c2ef14b2e1c8703eb5899764793dcf.tar.zst
freebsd-ports-gnome-fe5f4526f7c2ef14b2e1c8703eb5899764793dcf.zip
games/vegastrike: unbreak with clang 4.0
setup/src/include/central.cpp:37:37: error: ordered comparison between pointer and zero ('struct group *' and 'int') } while ((CURRENT = CURRENT->next) > 0); ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/central.cpp:45:37: error: ordered comparison between pointer and zero ('struct catagory *' and 'int') } while ((CURRENT = CURRENT->next) > 0); ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/central.cpp:57:37: error: ordered comparison between pointer and zero ('struct catagory *' and 'int') } while ((CURRENT = CURRENT->next) > 0); ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/central.cpp:67:29: error: ordered comparison between pointer and zero ('struct group *' and 'int') } while ((CUR = CUR->next) > 0); ~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/central.cpp:77:29: error: ordered comparison between pointer and zero ('struct catagory *' and 'int') } while ((CUR = CUR->next) > 0); ~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/central.cpp:87:36: error: ordered comparison between pointer and zero ('struct group *' and 'int') } while ((CUR = CUR->next) > 0); ~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/display_gtk.cpp:112:36: error: ordered comparison between pointer and zero ('catagory *' and 'int') } while ((NEWCUR = NEWCUR->next) > 0); ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/display_gtk.cpp:127:37: error: ordered comparison between pointer and zero ('struct group *' and 'int') } while ((CURRENT = CURRENT->next) > 0); ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/display_gtk.cpp:183:29: error: ordered comparison between pointer and zero ('struct catagory *' and 'int') } while ((CUR = CUR->next) > 0); ~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/file.cpp:170:52: error: ordered comparison between pointer and zero ('char *' and 'int') while ( ( n_parm = next_parm( parm ) ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/file.cpp:191:52: error: ordered comparison between pointer and zero ('char *' and 'int') while ( ( n_parm = next_parm( parm ) ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/file.cpp:321:52: error: ordered comparison between pointer and zero ('char *' and 'int') while ( ( n_parm = next_parm( parm ) ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ setup/src/include/general.cpp:124:46: error: ordered comparison between pointer and zero ('char *' and 'int') while ((location = strstr(current, search)) > 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ PR: 216072 Reported by: antoine (via exp-run)
-rw-r--r--games/vegastrike/files/patch-clang40125
1 files changed, 125 insertions, 0 deletions
diff --git a/games/vegastrike/files/patch-clang40 b/games/vegastrike/files/patch-clang40
new file mode 100644
index 000000000000..7581323a97dd
--- /dev/null
+++ b/games/vegastrike/files/patch-clang40
@@ -0,0 +1,125 @@
+--- setup/src/include/central.cpp.orig 2017-02-01 04:05:01 UTC
++++ setup/src/include/central.cpp
+@@ -34,7 +34,7 @@ void SetGroup(char *group, char *setting
+ do {
+ if (CURRENT->name == NULL) { continue; }
+ if (strcmp(group, CURRENT->name) == 0) { CURRENT->setting = NewString(setting); return; }
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ }
+ void SetInfo(char *catagory, char *info) {
+ struct catagory *CURRENT;
+@@ -42,7 +42,7 @@ void SetInfo(char *catagory, char *info)
+ do {
+ if (CURRENT->name == NULL) { continue; }
+ if (strcmp(catagory, CURRENT->name) == 0) { CURRENT->info = NewString(info); return; }
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ }
+
+ char *GetInfo(char *catagory) {
+@@ -54,7 +54,7 @@ char *GetInfo(char *catagory) {
+ if (CURRENT->info) { return CURRENT->info; }
+ else { return catagory; }
+ }
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ return catagory;
+ }
+
+@@ -64,7 +64,7 @@ char *GetSetting(char *group) {
+ do {
+ if (CUR->name == NULL) { continue; }
+ if (strcmp(CUR->name, group) == 0) { return CUR->setting; }
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ return '\0';
+ }
+
+@@ -74,7 +74,7 @@ struct catagory *GetCatStruct(char *name
+ do {
+ if (CUR->name == NULL) { continue; }
+ if (strcmp(CUR->name, name) == 0) { return CUR; }
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ return 0;
+ }
+
+@@ -84,7 +84,7 @@ struct group *GetGroupStruct(char *name)
+ do {
+ if (CUR->name == NULL) { continue; }
+ if (strcmp(CUR->name, name) == 0) { return CUR; }
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ return 0;
+ }
+
+--- setup/src/include/display_gtk.cpp.orig 2017-02-01 04:05:01 UTC
++++ setup/src/include/display_gtk.cpp
+@@ -109,7 +109,7 @@ void ShowMain(void) {
+ break;
+ }
+ i++;
+- } while ((NEWCUR = NEWCUR->next) > 0);
++ } while ((NEWCUR = NEWCUR->next));
+ // printf("\n\n");
+ gtk_widget_show (menu);
+ gtk_container_add(GTK_CONTAINER(vbox), menu);
+@@ -124,7 +124,7 @@ void ShowMain(void) {
+ gtk_widget_show(hbox);
+ }
+ column++;
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ if (column != 1) {
+ gtk_container_add(GTK_CONTAINER(main_vbox), hbox);
+ gtk_widget_show(hbox);
+@@ -180,7 +180,7 @@ void AddCats(GtkWidget *vbox, char *grou
+ // gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ClickButton), CUR);
+ #endif
+ CUR->button = button;
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ }
+
+ void ClickButton(GtkWidget *w, struct catagory *CUR) {
+--- setup/src/include/file.cpp.orig 2017-02-01 04:05:01 UTC
++++ setup/src/include/file.cpp
+@@ -167,7 +167,7 @@ void LoadConfig( void )
+ n_parm = next_parm( parm ); //next_parm is a line splitter included with general.c
+ if (strcmp( "groups", parm ) == 0) {
+ parm = n_parm;
+- while ( ( n_parm = next_parm( parm ) ) > 0 ) {
++ while ( ( n_parm = next_parm( parm ) ) ) {
+ G_CURRENT->name = NewString( parm );
+ G_NEXT = (struct group*) malloc( sizeof (struct group) );
+ if (G_NEXT == 0) {
+@@ -188,7 +188,7 @@ void LoadConfig( void )
+ n_parm = next_parm( parm );
+ group = NewString( parm );
+ parm = n_parm;
+- while ( ( n_parm = next_parm( parm ) ) > 0 ) {
++ while ( ( n_parm = next_parm( parm ) ) ) {
+ C_CURRENT->name = NewString( parm );
+ C_NEXT = (struct catagory*) malloc( sizeof (struct catagory) );
+ if (C_NEXT == 0) {
+@@ -318,7 +318,7 @@ void Modconfig( int setting, char *name,
+ parm++;
+ if (strcmp( name, parm ) == 0) {commenting = setting; } else {
+ parm = n_parm;
+- while ( ( n_parm = next_parm( parm ) ) > 0 ) {
++ while ( ( n_parm = next_parm( parm ) ) ) {
+ if (parm[0] == '<') break;
+ if (strcmp( name, parm ) == 0) {
+ commenting = setting;
+--- setup/src/include/general.cpp.orig 2017-02-01 04:05:01 UTC
++++ setup/src/include/general.cpp
+@@ -121,7 +121,7 @@ char *replace(char *line, char *search,
+ if (calc > LENGTH) { return line; }
+ length = strlen(line);
+ strcpy(current, line);
+- while ((location = strstr(current, search)) > 0) {
++ while ((location = strstr(current, search))) {
+ chr_new[0] = '\0';
+ calc = strlen(current) - strlen(search) + strlen(replace);
+ if (calc > LENGTH) { strcpy(line, current); free(current); free(chr_new); return line; }