Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Issue 16] Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **'

fsvs
Discussion topic

Back to topic list

[Issue 16] Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **'

Author ryandesign
Full name Ryan Schmidt
Date 2012-07-14 05:28:49 PDT
Message http://fsvs.tigris.o​rg/issues/show_bug.c​gi?id=16






------- Additional comments from ryandesign at tigris dot org Sat Jul 14 05:28:48 -0700 2012 -------
Thanks. While what you committed in r2462 works, it's not strictly speaking correct.

As it was before, the line in configure.in read:

int main(int argc, char *args[])

This is what you wanted to appear in configure, but autoconf processes square brackets specially, which
has the effect of removing them, leaving an invalid line in configure. You changed the line in configure.in
so it reads:

int main(int argc, char **args[])

autoconf will still remove the square brackets, leaving a valid line in configure.

The strictly speaking correct fix is to either remove the brackets from the line in configure.in entirely:

int main(int argc, char **args)

Or do what I did in the patch I attached and escape the brackets in configure.in by doubling them:

int main(int argc, char *args[[]])

« Previous message in topic | 4 of 5 | Next message in topic »

Messages

Show all messages in topic

[Issue 16] New - Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **' ryandesign Ryan Schmidt 2012-07-12 19:26:33 PDT
     [Issue 16] Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **' ryandesign Ryan Schmidt 2012-07-12 19:27:06 PDT
     [Issue 16] Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **' pmarek P.Marek 2012-07-12 22:37:08 PDT
     [Issue 16] Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **' ryandesign Ryan Schmidt 2012-07-14 05:28:49 PDT
     [Issue 16] Compile fails with clang: You have a sparse S_IFMT; second parameter of 'main' (argument array) must be of type 'char **' pmarek P.Marek 2012-07-14 08:32:54 PDT
Messages per page: