summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Fix uninitialized variable (should fix libusb retry handling)Thomas Jarosch2015-01-04
| | | | | | Reported by cppcheck Change-Id: I5ac7b73f2e3eaee3d5427d118944613e572f684d
* Remove unneeded std::string .c_str() callThomas Jarosch2015-01-04
| | | | | | | cppcheck reported: [utils/zenutils/source/update_patch/main.cpp:105]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. Change-Id: Ied9de135e693af22e1fdc3aa3b67d14b7d2c21e6
* Fix a tiny whitespace error in CREDITSFranklin Wei2015-01-04
| | | | | | Change-Id: I5273d5a70c504b976ced63f731bf39b35454f6ea Reviewed-on: http://gerrit.rockbox.org/1117 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* Add buflib tests to .gitignoreThomas Jarosch2015-01-03
| | | | Change-Id: Iabb499a77ec4d3459fe610d9bb7e4f23db01f885
* Add and adapt buflib shrink testsThomas Jarosch2015-01-03
| | | | Change-Id: I8aad86226c9c9b2c04727a3703941615638b3a49
* Add buflib test for maximum allocationThomas Jarosch2015-01-03
| | | | Change-Id: I9076b81d2fd2609ab3e9c8c5a087f8a387480f46
* Add and adapt buflib move testsThomas Jarosch2015-01-03
| | | | Change-Id: I57929f8f6a18cf9570f7358d48ad33f285b9ab0f
* Bring abroad second buflib testThomas Jarosch2015-01-03
| | | | | | | | | Interfaces with core_alloc_* instead of buflib directly. Provide UT_core_allocator_init() with a fixed buffer size for predictable results. Change-Id: I26a7b3101f7782063547940bded52d8202638394
* Enable printing of buflib allocationsThomas Jarosch2015-01-03
| | | | Change-Id: Ie446177931032d585f69e0651f05ff88ebc6e8ba
* Initial import of simple buflib unit testThomas Jarosch2015-01-03
| | | | | | | | | | | | | | | Taken from kugel's out-of-tree version: https://github.com/kugel-/buflib Needs some API adaptions. More test will follow. Note: The expected output needs an update since the in-tree version of buflib does buffer alignment and also progressed a bit. Still the tests are a very good start. Added Rockbox copyright header during import were needed. Change-Id: Ib39ec4301285f1dd53059b7bed0c0d6646297dc5
* Fix up some DEBUGF statementsThomas Jarosch2015-01-03
| | | | | | | | | | The last big filesystem code refactoring broke a lot of debug statements. firmware/test/fat/ doesn't build anymore, but that's more or less unrelated. Change-Id: I4c9e1289eeabe1b59d436b176f1d35a02176614f
* Multiple variables for 'my' need to be in parenthesisThomas Jarosch2015-01-03
| | | | | | | | | | | | | | | perl -wc reported: Parentheses missing around "my" list at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Name "main::doonly" used only once: possible typo at sims.pl line 9. -> now it's happy. Change-Id: I3b3685d6918ddb77e47c58bade931897075c6e04
* Don't build sims twiceThomas Jarosch2015-01-03
| | | | | | Some of those builds are already in the 'builds' list. Change-Id: I6985702d50ff00e166463384d78f823f6fad9873
* Fix syntax error (missing semicolon)Thomas Jarosch2015-01-03
| | | | | | Reported by TheSeven on IRC. Change-Id: Ie4bb331f9db050a90d99732e46c23f6402c7c320
* buflib: Switch from term "cookie" to "metadata"Thomas Jarosch2015-01-02
| | | | | | | | | The documentation of buflib first mentions metadata and then changes to "cookie" without explaining it. Fix it by sticking to metadata. Change-Id: I0b36b18f4f2590132901c10326481975f8b9b9da
* Improve core_alloc() / buflib_alloc() documentationThomas Jarosch2015-01-02
| | | | | | | | | | | | | | | | | | | | Document the fact that buffers are movable by default. Care must be taken to not pass them to functions that yield(). Also clarify other things: - Passing NULL as "ops" to buflib_alloc_ex() causes buffers to be movable by default (but not shrinkable). - If you want shrinkable buffers during compaction, you have to provide a shrink callback. - To disable buffer movement, you have to pass NULL for the move_callback inside the callback structure. - The concept of default callbacks was removed long ago, remove the only reference of it. Change-Id: I3bf0ea6b08b507d80a19f3c2c835aca32b3f7800
* Shortcuts: Add move callback for buflib allocationsThomas Jarosch2015-01-02
| | | | | | | | | | | | | | | If we don't provide a callback to buflib_alloc(), the buffer is always movable (to reduce fragmentation). We were passing around buffers to multiple functions that call yield() and might trigger buflib compaction. -> add locking while we are working on the buffers. Also added source code comments that explain why we added the locking in that particular section. Change-Id: Ie32867b0b735ddb2905fd4bd51342f61035f836f
* PictureFlow: Add move callback for buflib allocationsThomas Jarosch2015-01-01
| | | | | | | | | | If we don't provide a callback to buflib_alloc(), the buffer is always movable (to reduce fragmentation). Since we pass our buffer to functions that call yield(), this could lead to memory corruption on buflib compaction. Change-Id: Id1fad1822479d692551c55cb8bc87cea7b78f759
* XWorld: fix some typos in keymaps.hFranklin Wei2015-01-01
| | | | | | | | | Happy New Year! Change-Id: I228e4b9af9561eb70f75ebb57e333c78065873df Reviewed-on: http://gerrit.rockbox.org/1093 Reviewed-by: Thomas Jarosch <tomj@simonv.com> Tested: Thomas Jarosch <tomj@simonv.com>
* Limit "struct dircache_runinfo" to file scopeThomas Jarosch2015-01-01
| | | | Change-Id: Ib3edef9a4568605a36bdacde174dfa6bca2d26fa
* Add missing newline in debug outputThomas Jarosch2014-12-30
| | | | Change-Id: Ifd67dbcc80db328391464ec93316c48f914bc590
* Document 'union buflib_data'Thomas Jarosch2014-12-29
| | | | Change-Id: Ia98fa8e7887338d6c0b7a5795a0ae5c7a13014ba
* XWorld: cleanupFranklin Wei2014-12-28
| | | | | | | | | | - Comment keymaps.h - Tie XWORLD_DEBUG into ROCKBOX_HAS_LOGF to ease debugging - Fix up the manual a little bit Change-Id: I12cfb58001199036cd67dbaa27f164e6790a199d Reviewed-on: http://gerrit.rockbox.org/1084 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* More standard conforming codec_realloc()Thomas Jarosch2014-12-27
| | | | | | | | - Leave original ptr untouched if allocation fails (bail out early) - Behave like malloc() in case ptr is NULL Change-Id: Ib854ca19bd0e069999b7780d2d9a533ece705add
* Two more typo fixesThomas Jarosch2014-12-27
| | | | Change-Id: Id3ec7c1da356cb7c617a1d9ad57c9e0ae9fa6611
* Fix typos in documentationThomas Jarosch2014-12-27
| | | | Change-Id: I3c7e204bcf67bf0004314fe4b2aec98cae145273
* Fix for DX50 xworld keymaps.hBenjamin Brown2014-12-24
| | | | | | Change-Id: I6bf564cf009d935ebb1d7fb77ccb2eab8c87d2c7 Reviewed-on: http://gerrit.rockbox.org/1083 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Fixes more red for xworlds keymapsBenjamin Brown2014-12-24
| | | | | | | | A temporary fix for keymaps.h, the logic needs rewritten Change-Id: Ic8c81a5f01620ffc409cf6220b2916c0ec428dbe Reviewed-on: http://gerrit.rockbox.org/1082 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Xworld - Fixes warnings for cowond2, hifimanhm60x, ibassodx50, andBenjamin Brown2014-12-24
| | | | | | | | ondavx747. Also fixes errors for ondavx777. Change-Id: I1a5daa844759316df4dec7b869425ea9a174814b Reviewed-on: http://gerrit.rockbox.org/1081 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* Fixes xworld keymaps for ondavx747, hifimanhm60x, and cowond2Benjamin Brown2014-12-24
| | | | | | Change-Id: I62d7702d2e6541777f5553e27e166470004cd06d Reviewed-on: http://gerrit.rockbox.org/1080 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* fix xworld building with 24-bit lcdFranklin Wei2014-12-24
| | | | | | | | also fix a couple unused vars Change-Id: Ib05d2e22dd7477bc9bd193232bd3de8a0816beb2 Reviewed-on: http://gerrit.rockbox.org/1079 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* Fix compilation error.Michael Giacomelli2014-12-24
| | | | Change-Id: Ic565444bf1df955703dfe91adaf3094e8ab9b990
* Xworld - Another World interpreter for RockboxFranklin Wei2014-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-conspirators: Franklin Wei, Benjamin Brown -------------------------------------------------------------------- This work is based on: - Fabien Sanglard's "Fabother World" based on - Piotr Padkowski's newRaw interpreter which was based on - Gregory Montoir's reverse engineering of - Eric Chahi's assembly code -------------------------------------------------------------------- Progress: * The plugin runs pretty nicely (with sound!) on most color targets * Keymaps for color LCD targets are complete * The manual entry is finished * Grayscale/monochrome support is NOT PLANNED - the game looks horrible in grayscale! :p -------------------------------------------------------------------- Notes: * The original game strings were built-in to the executable, and were copyrighted and could not be used. * This port ships with an alternate set of strings by default, but can load the "official" strings from a file at runtime. -------------------------------------------------------------------- To be done (in descending order of importance): * vertical stride compatibility <30% done> * optimization <10% done> Change-Id: I3155b0d97c2ac470cb8a2040f40d4139ddcebfa5 Reviewed-on: http://gerrit.rockbox.org/1077 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* mikmod plugin: Remove bogus doubled return statementThomas Jarosch2014-12-22
| | | | | | | | Stick to the safer version of those two. Tested mikmod still works with some nice Necros .s3m files. Change-Id: I6774cdf3345a4c89b2f9cf3bb8d832963ca30c38
* zxbox: Add missing break; statementThomas Jarosch2014-12-22
| | | | | | | | | | No harm done, same values are assigned in the "default" case. cppcheck reported: [rockbox/apps/plugins/zxbox/tapefile.c:674] -> [rockbox/apps/plugins/zxbox/tapefile.c:681]: (warning) Buffer 'seg_desc' is being written before its old content has been used. 'break;' missing? Change-Id: I2bf044db9022c848c304f1ad88c012bd85ee61df
* Fix red (pass pointer of 'item')Thomas Jarosch2014-12-22
| | | | Change-Id: I2d04251519623b2531948615c35e61203f9a9940
* Always initialize "item"Thomas Jarosch2014-12-22
| | | | | | | | | | | | Otherwise item.cfg_name and item.default_val will contain garbage. It doesn't seem to have an effect right now, but who knows what a future refactoring might do. cppcheck reported: [rockbox/apps/settings.c:1268]: (error) Uninitialized variable: item Change-Id: Ic4d0c302929613de8f291cd2d69cd39db8711107
* wavrecord plugin: Add harmless sanity checkThomas Jarosch2014-12-21
| | | | | | | cppcheck reported: [rockbox/apps/plugins/wavrecord.c:3672]: (error) Array 'sampr[9][2]' index sampr[9][1] out of bounds. Change-Id: Ib1e9c25842aa275b15d8d817018cc523269b1f42
* Remove useless assignment of 'len'Thomas Jarosch2014-12-20
| | | | | | | | | | | The variable 'len' is not used after this statement. Probably a copy'n'paste leftover from the similar looking block above. cppcheck reported: [rockbox/utils/zenutils/source/shared/cenc.cpp:212]: (style) Same expression on both sides of '-'. Change-Id: Ia8357187ed39d3fab10d97df75a1146c4f733790
* sb1: fix buggy comparisonAmaury Pouly2014-12-20
| | | | | | | | | cppcheck reported: [rockbox/utils/imxtools/sbtools/sb1.c:440]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Thanks to Thomas Jarosch Change-Id: I0078232706d4014a1f2acea310a7a0d0edf7788b
* mkzenboot: Fix double close of bootfd on errorThomas Jarosch2014-12-20
| | | | | | | cppcheck reported: [rockbox/tools/mkzenboot.c:1176]: (error) Used file that is not opened. Change-Id: Ibbf7ab2910c7f43b547fef25c62e0b4d19ff9551
* DX 50: Fix file descriptor leak on errorThomas Jarosch2014-12-20
| | | | | | | | | | Unimportant change, still good style. cppcheck reported: [rockbox/firmware/target/hosted/android/dx50/button-dx50.c:92]: (error) Resource leak: fd [rockbox/firmware/target/hosted/android/dx50/button-dx50.c:98]: (error) Resource leak: fd Change-Id: Ic1831382219c44e7bef71cb2391646c9910d2369
* mini2440: Fix bogus buffer access in LCD backlight driverThomas Jarosch2014-12-20
| | | | | | | | | | | | | | | | | | | The backlight driver always writes a bogus value from memory into the LCD brightness register. Fix it up by adding bounds checks and use a more sane default value. While looking at the code, I noticed that BACKLIGHT_CONTROL_SET probably ignores the desired brightness level, too. Note: Please test on real hardware, I don't own it. cppcheck reported: [rockbox/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c:53]: (error) Array 'log_brightness[13]' accessed at index 255, which is out of bounds. Change-Id: Iaafa929a8adaa97b93ebcb66e1f6bd3bf0dad84e
* vibe 500: Fix ide_powered() always returning falseThomas Jarosch2014-12-20
| | | | | | | | | | | | | | While the right GPIO location is accessed, the result of the logical AND was tested wrong. I don't have this hardware, but I can imagine that bug caused ide_power_enable() to be called more times than it needed to be. cppcheck reported: [rockbox/firmware/target/arm/pbell/vibe500/power-vibe500.c:101]: (style) Expression '(X & 0x8) == 0x1' is always false. Change-Id: I98498f79d383c6f29869e170bfc94ba9a0d2ba7e
* Add missing va_end() call when the log is fullThomas Jarosch2014-12-20
| | | | | | | | | No need to go out of memory, too ;) cppcheck reported: [rockbox/firmware/logf.c:338]: (error) va_list 'ap' was opened but not closed by va_end(). Change-Id: I00e4c04d7e3d5d1415aa5066487ce1d9209e53aa
* Prevent theoretical out-of-bounds access in STM_Load()Thomas Jarosch2014-12-20
| | | | | | | | | | | We should be safe since STM_Load() should never be called if STM_Test() fails. Still it's better safe than sorry. cppcheck reported: [rockbox/apps/plugins/mikmod/load_stm.c:302]: (error) Array 'STM_Version[3]' accessed at index 3, which is out of bounds. Change-Id: I914935fd108c492d013de24d17dcb9c227af6cd8
* m3u playlist parser: Check size limit before using bufferThomas Jarosch2014-12-20
| | | | | | | | | | This should only be a problem if the last line is not terminated by \r or \n though. cppcheck reported: [rockbox/apps/playlist.c:234]: (style) Array index 'i' is used before limits check. Change-Id: I8182b66272ba9c024984c81588bd2a6dbb8255b8
* text_viewer plugin: Fix two out-of-bounds buffer accessesThomas Jarosch2014-12-20
| | | | | | | | | | | | | | | | | | | | | Test code: -------------- int main(void) { static unsigned short extra_spaces[] = { 0, 0x3000 }; return sizeof(extra_spaces); } -------------- -> returns four instead of two. cppcheck reported: [rockbox/apps/plugins/text_viewer/tv_text_processor.c:180]: (error) Array 'break_chars[27]' acces sed at index 53, which is out of bounds. [rockbox/apps/plugins/text_viewer/tv_text_processor.c:195]: (error) Array 'extra_spaces[2]' acces sed at index 3, which is out of bounds. Change-Id: I66c305cc5c99e59e7c8e0aa9c86cecbe293ff037
* Fix broken buflib_handle check in backdrop settings loaderThomas Jarosch2014-12-20
| | | | | | | | | | | | The logic was messed up and always evaluated to true if buflib_handle is non-zero. Thanks to JdGordon for verifying the change. cppcheck reported: [rockbox/apps/gui/skin_engine/skin_backdrops.c:262]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Change-Id: Ib52a73e0a6a2017a631e2dec19b638a2974dab83
* maemo port: Fix startup crash exposed by audio thread refactoringThomas Jarosch2014-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring of the audio thread in this commit ----------------------------------------------- commit 5857c44017a1641fce7f00da7f16c143daacbaf6 Author: Michael Sevakis <jethead71@rockbox.org> Date: Fri May 31 02:41:02 2013 -0400 Refactor audio thread to run both recording and playback. ----------------------------------------------- moved pcm_init() next to dsp_init() in apps/main.c:init(). Before that pcm_init() was called by audio_init(). Unfortunately the maemo init code didn't properly wait until the maemo thread was fully initialized, leading to dangling pointers when the code called by pcm_init() tried to access maemo's variables. Fix it by refactoring the "very fast shutdown" semaphore to wait until maemo is initialized in any case. This should also fix very rare rockbox crashes on startup that I got once a year or so. The new code has been tested by a script that starts and kills rockbox after one second. Change-Id: I464efce5f2b71ca869c72a5bc578555b8022e459