[GRASS-dev] d.legend uses a static buffer for `map='

Ivan Shmakov ivan at theory.asu.ru
Sun Jan 13 22:31:33 EST 2008


>>>>> Glynn Clements <glynn at gclements.plus.com> writes:

[...]

 >> Things I didn't change with this patch:

 >> * buffers related to SQL commands, because I know no appropriate Cpp
 >> macro for these;

 > I would suggest just adding e.g.:

 > #define SQL_COMMAND_MAX 4000

 > to the top of the file, then using that. Although it doesn't provide
 > consistency between modules, it makes it easier to find such
 > constants if they're at the top of the file.

	There're just too many files for this macro to be defined.
	Could there be a separate header to define the macros like this
	one?

[...]

 >> * misused G_warning (), etc.; like:

[...]

 >> there're just too many of these and I hope to handle them with a
 >> script;

 > Note that those functions are tagged with:

 > __attribute__((format(printf,1,2)));

 > With gcc, you can use the option:

 > `-Wformat-nonliteral' If `-Wformat' is specified, also warn if the
 > format string is not a string literal and so cannot be checked,
 > unless the format function takes its format arguments as a `va_list'.

 > to identify problematic cases (although --with-nls will interfere
 > with this).

	It much more a problem to get them changed automatically than to
	get them identified.



More information about the grass-dev mailing list