Fix possible null pointer dereference at line 314
when 'submenu' is NULL at line 297.
Pointed out by cppcheck.
Change-Id: I054f63d574f4a9608df49d48ee74b87cd0116f69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3492
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fix value stored to 'maxWidth' or 'maxHeight' is never read
when maxWidth > fMaxWidth or maxHeight > fMaxHeight.
Pointed out by Clang Static Analyzer.
Change-Id: I2bd0b8712d47e64298c0f915f24f7f1c87f4362e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3474
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
C++ don't allow zero size class fields. If field with empty class field
is used, it's size will be 1 byte.
Create DeleteFunc instance as local variable at each use instead.
Fixes#16638.
Change-Id: Ifb76c45ea02e9fed014751542ee5f16f41e11d15
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3458
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The same as CObjectDeleter.
Change-Id: I85c4cb3635f01f13e529ca087324cc2fcb42cfc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3456
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
It allows to make typedef of pointer types and declaring pointers in headers.
Store of destructor function pointer in CObjectDeleter is no longer needed.
Change-Id: Ic629fd10b28b09f4190edf8ba6b911ca3108ab0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3455
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
All other functions that support these handle them specifically,
so vm_create_anonymous_area must do so as well.
Change-Id: I7233770926b718936baeff10ef73668ac15c5201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3477
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fix value stored to 'status' is never read.
Pointed out by Clang Static Analyzer.
Change-Id: I0bbeafb74168d566128b53f8ad40e71218c78c45
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3473
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Also use the correct symbol for the return key (we were using another
similar arrow because this one was not available in DejaVu Sans).
Fixes#14034.
Note that build/jam/repositories/HaikuPorts ships an old version of the
Noto package that does not include the Symbols2 font. It should be
updated. Adding this to the pile of lagging behind packages, alongside
icu, mawk/gawk, and tnftp. Can anyone take care of it?
Fix leak of memory allocated to 'app'.
Pointed out by Clang Static Analyzer.
Change-Id: I59d39b76a18893bd284db1d75e40620bb1aee9e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3480
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Fix value stored to 'flags' is never read.
Pointed out by Clang Static Analyzer.
Change-Id: Ia154fbdd4dd5fb10716cf9079625ca65e2f58122
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3472
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
U8 sound has a nonzero value as its zero amplitude, so it needs to be
special-cased when mixing, applying gains and other transformations.
Change-Id: I5ad96b5f39d454bffad2449ac9f27b2ae61e2ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3470
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Can't call InfoView() with an unlocked BGLView.
* If unable to obtain to glGetString, show some "unknown" messages
Change-Id: I17d8ff84feed166644d54b0e19e0ef1fce202a74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3476
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Make object ownership explicit by use of ObjectDeleter where possible.
Change-Id: I499a00aa3390d1510ae284419e73faffa5166430
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2695
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
We can read leaf directories now but I've only checked for a single
block working right now. I might make a few more changes in an upcoming
patch.
Change-Id: I325de8a6fad4ef9298e7810256cba47a87c45187
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3027
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Main issue was use of sizeof(dirent) instead of sizeof(struct dirent).
It didn't cause any issue before but I found it ambiguous. Also, renamed
the dirent variable to buffer to remove any ambiguity.
Change-Id: I36ab40eea354424a4fddc3292ee7e1aaed446859
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3198
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Patch by mark_mcs, edited by me
this fixes#16030
Change-Id: I9255fe960f73cdfc3fd2668cdaf7db19fedd70f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3451
Reviewed-by: Rene Gollent <rene@gollent.com>
Some code in a just merged patch needs another one that's still being
discussed on Gerrit. Extract just the parts we need to get things
building again.
... so that the full file name is shown.
Center the file name in the edit box a bit better, the edit box is still
off compared to the non-editable file name by a pixel sometimes.
Use be_plain_font instead of getting the font from the PoseView since
the PoseView font is set to be_plain_font.
Fixes#16476
Change-Id: Ibda9341593163cdde898a83c98bf5ccea37126be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3399
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Make the glyph layout engine look for a suitable font fallback for each
missing character, instead of using the first one found for all of them.
Solves #16404, #16213, maybe other garbled text issues.
Does not solve similar issues of getting slightly different positions and
widths for a whole string than for the sum of its parts due to subpixel
rendering (cf #15007 comment 2).
Change-Id: I40664e32c8ecd5f09e10aa7a60fcdaec230471b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3273
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Fix an issue #5496 where panic occurs when creating a file with nfs v2
due to the newly generated vnode of the file is not published
and is still busy.
Change-Id: I490a10d4c7de6c87e309a21da575d6cc1a521974
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3436
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Removes several previous hacks, and makes kernel loading
by our bootloader more reliable.
* Long list of "Couldn't find both text and data" errors
no gone in our bootloader as it loads our kernel
Change-Id: Ic9f5ed44975d41fb22d7ab19536261432abe84ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3444
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Values are using a scale of 1000, but limits are set 0..100. Very
visible in media preferencies when using balance controls for stereo
connections in the mixer: the control is shown full right at first and
the moment you touch it and the gain is updated, you only get sound from
the left channel.
Probably the root cause of #15836 and #16070.
Change-Id: I31d3b6b11a57ca99a1cc8373d9fb003f21b192b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3445
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Disable automatic sorting of items dragged onto the playlist. Instead,
offer sorting of new items by a submenu from a right-click drag.
Change-Id: I8b7e241eb9a6335cdcebfc51267e5484f762e700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3414
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>