1
1

Fix a number of places where we can cause errors in configure if CFLAGS /

CXXFLAGS are set to -Wall -Werror.  Thanks to Ralf for the patch.

refs trac:290

This commit was SVN r11762.

The following Trac tickets were found above:
  Ticket 290 --> https://svn.open-mpi.org/trac/ompi/ticket/290
Этот коммит содержится в:
Brian Barrett 2006-09-22 23:58:23 +00:00
родитель d636db5832
Коммит e3497a8bff
9 изменённых файлов: 13 добавлений и 14 удалений

Просмотреть файл

@ -29,7 +29,7 @@ AC_DEFUN([OMPI_C_GET_ALIGNMENT],[
#include <stdio.h>
#include <stdlib.h>
struct foo { char c; $1 x; };
int main(int argc, char* argv[])
int main()
{
struct foo *p = (struct foo *) malloc(sizeof(struct foo));
int diff;

Просмотреть файл

@ -33,7 +33,7 @@ EOF
cat > conftest.c <<EOF
extern int fake(int i);
extern int real(int i);
int main(int argc, char *argv[]) { return fake(3); }
int main() { return fake(3); }
EOF
# Try the compile

Просмотреть файл

@ -91,7 +91,7 @@ foo<T>::member(int i)
}
int
main(int argc, char *argv[])
main()
{
foo<bar> var1(6);
foo< foo<bar> > var2(var1);

Просмотреть файл

@ -56,7 +56,6 @@ void $ompi_print_logical_fn(ompi_fortran_logical_t * logical);
void $ompi_print_logical_fn(ompi_fortran_logical_t * logical)
{
int result = 0;
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
@ -89,7 +88,7 @@ EOF
[happy=0])
if test "$happy" = "0" ; then
AC_MSG_ERROR([Could not determine value of Fotran .TRUE.. Aborting.])
AC_MSG_ERROR([Could not determine value of Fortran .TRUE.. Aborting.])
fi
AS_IF([test "$cross_compiling" = "yes"],

Просмотреть файл

@ -36,7 +36,7 @@ void func (int c, char * f, ...)
va_end (arglist);
}
int main (int argc, char * argv[])
int main ()
{
FILE *f;
func (4711, "Help %d [%s]\n", 10, "ten");

Просмотреть файл

@ -44,7 +44,7 @@ AC_TRY_RUN([#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
void *checkpid(void *arg);
int main(int argc, char* argv[]) {
int main() {
pthread_t thr;
int pid, retval;
pid = getpid();

Просмотреть файл

@ -211,7 +211,7 @@ void gsym_test_func(void);
}
#endif
int
main(int argc, char *argv[[]])
main()
{
gsym_test_func();
return 0;

Просмотреть файл

@ -40,7 +40,7 @@ AC_DEFUN([OMPI_MICROSOFT_COMPILER],[
AC_MSG_CHECKING(for working InterlockedCompareExchange)
AC_TRY_RUN( [#include <windows.h>
int main( int argc, char** argv ) {
int main() {
LONG dest = 1, exchange = 0, comperand = 1;
SetErrorMode(SEM_FAILCRITICALERRORS);
InterlockedCompareExchange( &dest, exchange, comperand );
@ -56,7 +56,7 @@ AC_DEFUN([OMPI_MICROSOFT_COMPILER],[
AC_MSG_CHECKING(for working InterlockedCompareExchangeAcquire)
AC_TRY_RUN( [#include <windows.h>
int main( int argc, char** argv ) {
int main() {
LONG dest = 1, exchange = 0, comperand = 1;
SetErrorMode(SEM_FAILCRITICALERRORS);
InterlockedCompareExchangeAcquire( &dest, exchange, comperand );
@ -72,7 +72,7 @@ AC_DEFUN([OMPI_MICROSOFT_COMPILER],[
AC_MSG_CHECKING(for working InterlockedCompareExchangeRelease)
AC_TRY_RUN( [#include <windows.h>
int main( int argc, char** argv ) {
int main() {
LONG dest = 1, exchange = 0, comperand = 1;
SetErrorMode(SEM_FAILCRITICALERRORS);
InterlockedCompareExchangeRelease( &dest, exchange, comperand );
@ -88,7 +88,7 @@ AC_DEFUN([OMPI_MICROSOFT_COMPILER],[
AC_MSG_CHECKING(for working InterlockedCompareExchange64)
AC_TRY_RUN( [#include <windows.h>
int main( int argc, char** argv ) {
int main() {
LONGLONG dest = 1, exchange = 0, comperand = 1;
SetErrorMode(SEM_FAILCRITICALERRORS);
InterlockedCompareExchange64( &dest, exchange, comperand );

Просмотреть файл

@ -225,7 +225,7 @@ if test "x$ac_cv_header_sys_event_h" = "xyes"; then
#include <stdlib.h>
int
main(int argc, char **argv)
main()
{
int kq;
int n;
@ -289,7 +289,7 @@ epoll_create(int size)
}
int
main(int argc, char **argv)
main()
{
int epfd;