found a bug in gmp-4.2.4

Torbjorn Granlund tg at
Mon Mar 23 09:51:31 CET 2009

"Martin Ettl" <ettl.martin at> writes:

  i have checked the gmp-4.2.4 source with a static code analyis tool (cppcheck). It brought up an issue in file /mpz/export.c at line 66.
  I used the following command:
  cppcheck -q -a -j2 -f gmp-4.2.4/
  [./mpz/export.c:66]: (error) Wrong assignement of an auto-variable to an effective parameter of a function
  The code, the code analysis tool complains about:
    if (countp == NULL)
      countp = &dummy;
I believe cppcheck is wrong.  If somebody agrees with cppcheck, please
explain to me what is wrong with the code.


More information about the gmp-bugs mailing list