From owner-svn-ports-all@freebsd.org Wed Feb 1 05:29:07 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806B4CCDA58; Wed, 1 Feb 2017 05:29:07 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B2591886; Wed, 1 Feb 2017 05:29:07 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v115T6mZ088929; Wed, 1 Feb 2017 05:29:06 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v115T65l088927; Wed, 1 Feb 2017 05:29:06 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201702010529.v115T65l088927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 1 Feb 2017 05:29:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r432986 - head/editors/yui/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 05:29:07 -0000 Author: jbeich Date: Wed Feb 1 05:29:06 2017 New Revision: 432986 URL: https://svnweb.freebsd.org/changeset/ports/432986 Log: editors/yui: partially unbreak with clang 4.0 main.cc:1153:36: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf1024, 1023, f ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:1768:39: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf1024, 1023, f ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:1865:35: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf1024, 1023, f ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:1948:35: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf1024, 1023, f ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:2030:39: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf1024, 1023, f ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:2147:39: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf1024, 1023, f ) > 0 ) { ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:2483:37: error: ordered comparison between pointer and zero ('char *' and 'int') if ( fgets( buf1024, 1023, f ) <= 0 ) ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ main.cc:2618:32: error: ordered comparison between pointer and zero ('char *' and 'int') while( fgets( buf, 1023, f ) > 0 ) ~~~~~~~~~~~~~~~~~~~~~ ^ ~ yui1.cc:2668:19: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if ( forig <= 0 ) { ~~~~~ ^ ~ yui1.cc:2678:15: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if ( fbak <= 0 ) { ~~~~ ^ ~ yui1.cc:2787:15: error: ordered comparison between pointer and zero ('FILE *' (aka '__sFILE *') and 'int') if ( forig <= 0 ) { ~~~~~ ^ ~ Reported by: antoine (via exp-run) Added: head/editors/yui/files/patch-tyui_main.cc (contents, props changed) head/editors/yui/files/patch-tyui_yui1.cc (contents, props changed) Added: head/editors/yui/files/patch-tyui_main.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/editors/yui/files/patch-tyui_main.cc Wed Feb 1 05:29:06 2017 (r432986) @@ -0,0 +1,74 @@ +--- tyui/main.cc.orig 2011-09-29 06:55:56 UTC ++++ tyui/main.cc +@@ -1150,7 +1150,7 @@ void Appl::findCtag( char *ctag ) + int line=0; + Edit *e = NULL; + +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + buf1024[1023] = 0; + if ( buf1024[0] == 0x1b || !(s=strtok( buf1024, "\t" )) || strcmp( ctag, s ) ) + continue; +@@ -1765,7 +1765,7 @@ void Appl::readOptions() + char *s = NULL; + OPT_info *cinfo = NULL; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + buf1024[1023] = 0; + s=strtok( buf1024, " \t\r\n" ); + for( int first=1; s; s=strtok( 0, " \t\r\n" ) ) { +@@ -1862,7 +1862,7 @@ void Appl::readColormap() + for( int i=0; i < len_color_info; i++ ) + color_info[i].inited = 0; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + buf1024[1023] = 0; + s=strtok( buf1024, " \t\r\n" ); + for( int first=1; s; s=strtok( 0, " \t\r\n" ) ) { +@@ -1945,7 +1945,7 @@ void Appl::readColortrans() + char *fg=NULL, *bg=NULL, *s=NULL; + int found_term=0, c_fg=0, c_bg=0; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + if ( fg && bg ) + break; + buf1024[1023] = 0; +@@ -2027,7 +2027,7 @@ void Appl::readKeymap() + for( int i=0; i < len_com_info; i++ ) + com_info[i].inited = 0; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + COM_info *cinfo = NULL; + buf1024[1023] = 0; + s=strtok( buf1024, " \t\r\n" ); +@@ -2144,7 +2144,7 @@ void Appl::readMacro() + } + if ( f ) { + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + + + } +@@ -2480,7 +2480,7 @@ void parse_highlight( const char *home ) + int punctuate = 1; + tinfo.name = buf2; + for( int cycle=1; cycle; ) { +- if ( fgets( buf1024, 1023, f ) <= 0 ) ++ if ( fgets( buf1024, 1023, f ) == NULL ) + { + cycle=0; + if ( ext ) +@@ -2615,7 +2615,7 @@ void parse_highlight_html( const char *h + unsigned param=0, hend=0, ret=0; + tinfo.name = buf2; + int ext_flag = 1; +- while( fgets( buf, 1023, f ) > 0 ) ++ while( fgets( buf, 1023, f ) ) + { + buf[1023] = 0; + if ( sscanf( buf, "%[^# \t]%u%u", buf2, ¶m, &hend ) != 3 ) Added: head/editors/yui/files/patch-tyui_yui1.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/editors/yui/files/patch-tyui_yui1.cc Wed Feb 1 05:29:06 2017 (r432986) @@ -0,0 +1,29 @@ +--- tyui/yui1.cc.orig 2011-09-29 11:50:50 UTC ++++ tyui/yui1.cc +@@ -2665,7 +2665,7 @@ int Edit::saveText( char *Name ) + Screen::sync(); + if ( strlen(name) > 0 && BAK_FILE(eOpt.options) ) { + FILE *forig = fopen( name, "r" ); +- if ( forig <= 0 ) { ++ if ( forig == NULL ) { + modal *m = new modal( ALIGN_CENTER, + lang( "Can't open original file,\ncreation of backup file skipped", + "Ошибка открытия исходного файла,\nсоздание '.bak'-файла пропущено" ), Warning.get() ); +@@ -2675,7 +2675,7 @@ int Edit::saveText( char *Name ) + char *nameBack = strdup( Buf1 ); + fd = open( nameBack, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ); + FILE *fbak = (fd >= 0 ? fdopen( fd, "w+" ) : 0); +- if ( fbak <= 0 ) { ++ if ( fbak == NULL ) { + sprintf( Buf1, openError.get(), nameBack ); + modal *m = new modal( ALIGN_CENTER, (char*)Buf1, Warning.get() ); + execUp( m ); +@@ -2784,7 +2784,7 @@ write_char: + unlink( realName ); + fd = open( realName, O_RDWR | O_CREAT | O_TRUNC, fInfo->s.st_mode ); + FILE *forig = (fd >= 0 ? fdopen( fd, "w+" ) : 0); +- if ( forig <= 0 ) { ++ if ( forig == NULL ) { + fclose( f ); + sprintf( Buf1, lang("Can't open file\n%s\n\nCheck permissions, your file saved in\n%s", + "Ошибка открытия файла\n%s\n\nПроверьте права доступа, файл сохранен в\n%s"), name, tmp );