Giter VIP home page Giter VIP logo

Comments (7)

farcepest avatar farcepest commented on August 19, 2024

Apparently it doesn't affect all compilers, or none of my tests would work, and it does build on Travis. But I'll fix it. (well actually I probably wasn't hitting the case in question on my system)

from mysqldb1.

qris avatar qris commented on August 19, 2024

I think it would depend on your version of MySQL whether HAVE_MYSQL_OPT_READ_TIMEOUT was defined or not (otherwise, why bother having a test at all?). Anyway it breaks on mine.

I'd be very surprised if any decent C compiler (especially any recent version of gcc) did not abort on this error in one way or another.

from mysqldb1.

jeansch avatar jeansch commented on August 19, 2024

Hi, qris, can you tell me which compitator you are using ? And the error you have please.

#include <stdio.h>

static char *kwlist[] = { "host", "user", "passwd", "db", "port",
                          "unix_socket", "conv",
                          "connect_timeout", "compress",
                          "named_pipe", "init_command",
                          "read_default_file", "read_default_group",
                          "client_flag", "ssl", "local_infile",
};

int main(void) {
  printf("%d\n", (int)(sizeof(kwlist)/sizeof(*kwlist)));
  return 0;
}

/* cc -o plop plop.c -Wall -ansi -pedantic
 ./plop
 16 */

from mysqldb1.

farcepest avatar farcepest commented on August 19, 2024

jeansch: I fixed this in fc0c03a

from mysqldb1.

farcepest avatar farcepest commented on August 19, 2024

Fix is in 1.2.4b5

from mysqldb1.

qris avatar qris commented on August 19, 2024
[chris@fen-vz-atamis mysql-python]$ gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info="(1,2,4,'beta',4)" -D__version__=1.2.4b4 -I/usr/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-i686-2.6/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
_mysql.c:602: error: expected expression before ‘)’ token

[chris@fen-vz-atamis ~]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

from mysqldb1.

qris avatar qris commented on August 19, 2024

@jeansch, you are testing something different. Trailing commas are allowed in array initialisers, to allow us to reduce noise in diffs. They are not allowed in function arguments.

from mysqldb1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.