Compiler warning cleanup - unitilized const variables, pointer type mismatch

Поиск
Список
Период
Сортировка
Искать
От
Zdenek Kotala
Тема
Compiler warning cleanup - unitilized const variables, pointer type mismatch
Дата
в 06:11:44
Msg-id
1243501880.1372.23.camel@localhost
Список
Дерево обсуждения
Compiler warning cleanup - unitilized const variables, pointer type mismatch Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Tom Lane <tgl@sss.pgh.pa.us>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Tom Lane <tgl@sss.pgh.pa.us>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Michael Meskes <meskes@postgresql.org>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Michael Meskes <meskes@postgresql.org>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Tom Lane <tgl@sss.pgh.pa.us>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch Zdenek Kotala <Zdenek.Kotala@Sun.COM>
I attached another cleanup patch which fixes following warnings reported
by Sun Studio:

"zic.c", line 1534: warning: const object should have initializer: tzh0
"dynloader.c", line 7: warning: empty translation unit
"pgstat.c", line 666: warning: const object should have initializer: all_zeroes
"pgstat.c", line 799: warning: const object should have initializer: all_zeroes
"pgstat.c", line 2552: warning: const object should have initializer: all_zeroes
"preproc.c", line 39569: warning: pointer expression or its operand do not point to the same object yyerror_range, result is undefined and non-portable 
"tab-complete.c", line 587: warning: assignment type mismatch:
	pointer to function(pointer to const char, int, int) returning pointer to pointer to char "=" pointer to void


Following list is still unfixed plus see my comments:

"gram.c", line 28487: warning: pointer expression or its operand do not point to the same object yyerror_range, result is undefined and non-portable 

        - This is really strange warning. The code is really strange
        because it points to -1 index of array, but I'm not bison guru.
        Maybe it is correct, but it would be good if somebody check it.

"../../../src/include/pg_config.h", line 782: warning: macro redefined: _FILE_OFFSET_BITS

   - This probably needs some extra love in configure.

"regc_lex.c", line 401: warning: loop not entered at top
"regc_lex.c", line 484: warning: loop not entered at top
"regc_lex.c", line 578: warning: loop not entered at top
"regc_lex.c", line 610: warning: loop not entered at top
"regc_lex.c", line 870: warning: loop not entered at top
"regc_lex.c", line 1073: warning: loop not entered at top
"postgres.c", line 3845: warning: loop not entered at top
	
        - Assert on not reached place probably confuse compiler. I'm not
        sure if it make sense nowadays? Most compiler should optimize
        this anyway and code is removed. I suppose to remove these
        asserts.


	Zdenek
В списке pgsql-hackers по дате отправления
От: Dimitri Fontaine
Дата:
Сообщение: Re: search_path vs extensions
От: Albe Laurenz
Дата:
FAQ