Skip to content

Instantly share code, notes, and snippets.

View scriptum's full-sized avatar

Pavel Roschin scriptum

View GitHub Profile
@scriptum
scriptum / spellcheck bug
Created April 27, 2014 18:59
spellcheck bug
$ LC_ALL=C make
CC spellcheck_la-speller.lo
speller.c: In function 'sc_speller_check_word':
speller.c:136:2: warning: implicit declaration of function 'EMPTY' [-Wimplicit-function-declaration]
if (EMPTY(word))
^
speller.c: In function 'sc_speller_is_text':
speller.c:1021:10: error: 'SCE_POWERSHELL_COMMENTDOCKEYWORD' undeclared (first use in this function)
case SCE_POWERSHELL_COMMENTDOCKEYWORD:
^
12:14 b4n __RPG_: TL;DW (watch), but the start seems to be probably somewhat doable with snippets, wouldn't it?
12:15 b4n the numbered list stuff not, but hum
12:15 b4n ah no wait, length of the -- counts, nevermind
12:15 b4n __RPG_: BTW, about your report on geanylatex, I'm afraid I can't reproduce, which means I can't see what part is problematic
12:16 b4n __RPG_: have you a "steps to reproduce"?
12:16 b4n (or could you reproduce under GDB and print everything relevant)
12:18 Pierre has quit IRC
12:19 elextr feels weird typing std::strlen()
12:19 elextr shivvers all over
12:20 Pierre has joined #geany
@scriptum
scriptum / bugs
Last active August 29, 2015 13:58
Geany bugs
Bug in geanylatex plugin: with "Toggle special character replacement" option - type symbol `_`, it will result into `_\_}`
Shift column plugin bug (?): I just cant use it. It behaves very strange.
Select some text and try to use this plugin. Also it doesn't work with rectangular selections.
Too many text in description of Code navigation plugin.
Not a bug but it's hard to read and there is "TODO" thing not updated for years.
GeanyPy plugin - very non-intuitive plugin list placement!
@scriptum
scriptum / cppcheck-gimp-1.c
Created February 8, 2014 18:12
cppcheck-gimp-1
void
gimp_context_get_foreground (GimpContext *context,
GimpRGB *color)
{
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (color != NULL);
*color = context->foreground;
}
@scriptum
scriptum / doc == NULL
Last active January 3, 2016 11:19
All doc == NULL in Geany
./plugins/export.c:163: g_return_if_fail(doc != NULL);
./plugins/htmlchars.c:584: if (doc != NULL)
./plugins/htmlchars.c:651: if (doc != NULL && sci_has_selection(doc->editor->sci))
./plugins/filebrowser.c:337: if (doc == NULL || doc->file_name == NULL || ! g_path_is_absolute(doc->file_name))
./plugins/filebrowser.c:503: if (doc != NULL && ! do_not_focus)
./plugins/saveactions.c:291: if (cur_doc == NULL)
./src/main.c:822: if (doc != NULL && main_status.opening_session_files)
./src/main.c:832: if (doc != NULL)
./src/msgwindow.c:667: if (doc == NULL) /* file not already open */
./src/msgwindow.c:670: if (doc != NULL)
@scriptum
scriptum / document.c
Last active January 3, 2016 11:08
Geany SEGV
//LOC 1238
/* set the cursor position according to pos, cl_options.goto_line and cl_options.goto_column */
pos = set_cursor_position(doc->editor, pos);
@scriptum
scriptum / cppcheck-geany-simplified
Last active December 27, 2015 21:29
cppcheck-geany-simplified
geany-master/plugins/htmlchars.c:804: style: Redundant condition. It is valid to free a NULL pointer.
geany-master/src/build.h:159: style: DCL05-C. Use typedefs of non-pointer types only
geany-master/src/editor.c:2663: style: DCL04-C. Do not declare more than one variable per declaration
geany-master/src/prefix.c:58: style: Redundant condition. It is valid to free a NULL pointer.
geany-master/src/prefix.c:90: style: Redundant condition. It is valid to free a NULL pointer.
geany-master/src/utils.c:948: style: EXP08-C. Ensure pointer arithmetic is used correctly
geany-master/src/win32.c:1056: warning: ENV04-C. Do not call system() if you do not need a command processor
geany-master/tagmanager/ctags/cobol.c:37: style: DCL20-C. Always specify void even if a function accepts no arguments
geany-master/tagmanager/ctags/ctags.c:376: style: Redundant condition. It is valid to free a NULL pointer.
geany-master/tagmanager/ctags/haskell.c:47: style: DCL05-C. Use typedefs of non-pointer types only
@scriptum
scriptum / cppcheck-gimp
Created November 8, 2013 18:25
Cppcheck analysis of GIMP
$ cppcheck --max-configs=1 -q -j16 --library=gtk --template=gcc --std=posix `pkg-config --cflags glib-2.0` .
app/config/gimpconfig-dump.c:472: error: Memory leak: blurb
app/actions/view-actions.c:642: error: Possible null pointer dereference: shell
app/core/gimp-contexts.c:65: error: Memory pointed to by 'context' is freed twice.
app/core/gimpdrawable-bucket-fill.c:117: error: Uninitialized variable: color
app/core/gimpdrawable-blend.c:1060: error: Memory leak: _timer
app/core/gimpdata.c:911: error: Memory leak: dirname
app/core/gimpprojection.c:594: error: Memory leak: timer
app/core/gimpprojection.c:595: error: Memory leak: timer
app/core/gimpdashpattern.c:240: error: Memory leak: pattern
@scriptum
scriptum / cppcheck-deadbeef
Last active December 27, 2015 18:50
Cppcheck analysis of deadbeef 0.5.6
$ cppcheck -q -j16 --library=gtk --template=gcc --std=posix .
dsppreset.c:59: error: Width 100 given in format string (no. 1) is larger than destination buffer 'temp[100]', use %99s to prevent overflowing it.
intl/vasnprintf.c:4717: error: Uninitialized variable: pad_ourselves
intl/vasnprintf.c:4755: error: Uninitialized variable: pad_ourselves
md5/md5.c:207: error: Uninitialized variable: X
md5/md5.c:208: error: Uninitialized variable: X
md5/md5.c:209: error: Uninitialized variable: X
md5/md5.c:210: error: Uninitialized variable: X
md5/md5.c:211: error: Uninitialized variable: X
md5/md5.c:212: error: Uninitialized variable: X
@scriptum
scriptum / geany-cppcheck-result
Last active December 27, 2015 17:09
Geany code analysis by cppchech with my glib config
=== COMMANDLINE ===
$ ./cppcheck --max-configs=1 -q -j16 --library=gtk --enable=performance,portability,information,warning --template=gcc --inconclusive --std=posix ../geany/src/ `pkg-config --cflags glib-2.0`
=== LEAKS ===
../geany/src/keyfile.c:665: error: Memory leak: tmp_array !NOT SURE. g_ptr_array_add called even for NULL???
../geany/src/symbols.c:1093: error: Memory leak: buffer
../geany/src/build.c:830: error: Mismatching allocation and deallocation: argv !FALSE-POS
../geany/src/build.c:856: error: Mismatching allocation and deallocation: argv !FALSE-POS
../geany/src/build.c:2416: error: Memory leak: key
../geany/src/build.c:2633: error: Memory leak: key