Johannes Sixt writes:
> * like function declarations. I.e., the expansion of
> *
> *define_commit_slab(indegree, int);
> *
> - * ends in 'static int stat_indegreerealloc;'. This would otherwise
> + * ends in 'struct indegree;'. This would otherwise
> * be a syntax error according
BTW, these are all instances of duplicated global static variables that
can be found in a standard Linux build.
How I found them? I waded through the error messages produced by compiling
the code base as C++ code for the fun of it (basically CFLAGS='-x c++
-fpermissive').
-- Han
The gigantic define_commit_slab() macro repeats the definition of a
static variable that occurs earlier in the macro text. The purpose of
the repeated definition at the end of the macro is that it takes the
semicolon that occurs where the macro is used.
We cannot just remove the first definition o
Repeating the definition of a static variable seems to be valid in C.
Nevertheless, it is bad style because it can cause confusion, definitely
when it becomes necessary to change the type.
d64ec16 (git config: reorganize to use parseopt, 2009-02-21) added two
static variables near the top of the
Jonathan Nieder wrote:
> Stefan Zager wrote:
>> This is probably a naive question, but: there are quite a lot of static
>> variables in the git code where it's really unnecessary. Is that just a
>> historical artifact, or is there some reason to prefer them?
>
>
Stefan Zager wrote:
> This is probably a naive question, but: there are quite a lot of static
> variables in the git code where it's really unnecessary. Is that just a
> historical artifact, or is there some reason to prefer them?
Sometimes it's for convenience. Other times
This is probably a naive question, but: there are quite a lot of static
variables in the git code where it's really unnecessary. Is that just a
historical artifact, or is there some reason to prefer them? I'm working
on a patch that will introduce threading, so naturally I'm on
From: Marc Branchaud
This prepares the code to handle a true remote.default configuration value.
Rename two variables:
default_remote_name --> effective_remote_name
explicit_default_remote_name --> explicit_effective_remote_name
effective_remote_name is the remote name that is curr
8 matches
Mail list logo