Re: [Geany-devel] RFC: uninitialized variable in theoretical execution path.

2011-08-07 Thread Daniel Marjamäki
Hi! >> I wrote a simple Cppcheck plugin that searches for "uninitialized >> variable" in "theoretical execution paths". It will assume that all >> conditions can always be both true/false. > Interesting, can it be found somewhere? I plan to make it available online. But it's not ready yet. It sh

[Geany-devel] Code review: suggest reorder of condition to put bounds check before use

2011-08-06 Thread Daniel Marjamäki
Hi! I saw this code in src/symbols.c at line 1917:        while (sci_get_style_at(sci, start) != fn_style                && start < max_pos) start++; If start >= max_pos then sci_get_style_at will be called (with out of bounds value?) and then the loop will bail out. I suggest that the conditio

[Geany-devel] either uninitialized variable or a redundant condition

2011-08-06 Thread Daniel Marjamäki
Hi! [src/tools.c:127]: (information) Suspecting that uninitialized variable is used: stock_id Either there is an "uninitialized variable" issue or else there is a redundant condition. In the file src/tools.c. The condition that might be redundant is on line 111:        else if (g_shell_parse_ar

[Geany-devel] RFC: uninitialized variable in theoretical execution path.

2011-08-06 Thread Daniel Marjamäki
Hi! I wonder what you think about fixing "uninitialized variable" issues for theoretical execution paths. What I mean with "theoretical" is that it is not assumed that parameters and global variables are restricted to the "possible" values - they could also have "impossible values". An example:

[Geany-devel] [Patch] memory leak in src/build.c

2010-09-08 Thread Daniel Marjamäki
Hello! I have another fix for a memory leak. Here is the code: static void process_build_output_line(const gchar *str, gint color) { gchar *msg, *tmp; gchar *filename; gint line; msg = g_strdup(str); g_strchomp(msg); if (! NZV(msg))

[Geany-devel] [PATCH] fix memory leak

2010-08-05 Thread Daniel Marjamäki
Hello! I believe this will fix a memory leak in src/search.c. But please double-check! At lines 1417-1422 the search_text is allocated: if (enc != NULL && g_utf8_validate(utf8_search_text, utf8_text_len, NULL)) { search_text = g_convert(utf8_search_text, utf8_text

[Geany-devel] RFC: remove includes

2010-07-25 Thread Daniel Marjamäki
Hello! Do you have any comments about this patch that remove includes? Best regards, Daniel remove-includes.diff Description: Binary data ___ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

[Geany-devel] [Patch] use g_free instead of free after g_malloc/g_strdup/etc

2010-06-30 Thread Daniel Marjamäki
Hello! This patch has simple code cleanups. Best regards, Daniel use-g_free-instead-of-free.diff Description: Binary data ___ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Re: [Geany-devel] Git switch

2010-06-14 Thread Daniel Marjamäki
I believe I have some relevant info about github. I have a repository at github. http://www.github.com/danmar/cppcheck I used sourceforge+svn when I started cppcheck. But then I moved the code repository to github. For the code hosting I think github is really good. The code review features are re

Re: [Geany-devel] Git switch

2010-06-13 Thread Daniel Marjamäki
I have a few years of daily experience both with SVN and GIT. We use SVN at work and I use GIT for all my personal projects. I like GIT better than SVN. In my humble opinion you shouldn't switch unless you are unhappy with sourceforge / svn. 2010/6/13 Enrico Tröger : > On Sun, 13 Jun 2010 10:05: