Bug #9603 libedit compile warning when using gcc 4.0
Submitted: 4 Apr 2005 11:18 Modified: 13 May 2005 17:03
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1 OS:Linux (Linux)
Assigned to: Jim Winstead CPU Architecture:Any

[4 Apr 2005 11:18] Lenz Grimmer
Description:
Compiling MySQL 4.1 with gcc 4.0 creates the following warning:

vi.c: In function 'vi_histedit':
vi.c:1022: warning: missing sentinel in function call

How to repeat:
Compile with libedit and gcc 4.0 - oberve the warning.

Suggested fix:
Please apply the following patch (already included in the libedit CVS at 
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libedit/

[SNIP]
--- cmd-line-utils/libedit/vi.c
+++ cmd-line-utils/libedit/vi.c
@@ -1019,7 +1019,7 @@
                return CC_ERROR;
        case 0:
                close(fd);
-               execlp("vi", "vi", tempfile, 0);
+               execlp("vi", "vi", tempfile, (char *) NULL);
                exit(0);
                /*NOTREACHED*/
        default:
[SNIP]
[6 Apr 2005 4:19] Jim Winstead
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23693
[6 Apr 2005 10:01] Lenz Grimmer
I noticed that you updated the entire libedit code in the 5.0 tree now, thanks. Could you please apply the small patch above in 4.1 as well? Thanks in advance!
[7 May 2005 13:11] Michael Widenius
Magnus has already updated 5.0 to a new libedit, so that is not anymore needed (Jim's original patch did that)
It's ok to just do the single line change mentioned in the bug report in 4.1 and 5.0
[7 May 2005 15:15] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24674
[13 May 2005 17:03] Jim Winstead
Fixed in 4.1.13.

(No need to document it.)