Conversation
... and improve performance slightly
* Packages:add cards counting (NuTyX) * package.c no need to add counts.catds * Sort packages print alphabetically * ditto * ditto * packages.c update FF_ARG and ffpackagesModule.info --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Noop, because the whole platform is statically initialized Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: or sim <you@example.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Fk `clang-format`
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 108 out of 108 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (8)
src/common/impl/sysctl.c:1
- The
malloc(*resultLength)NULL-check was removed. If allocation fails,sysctl()will be called with a NULL buffer and can crash. Restore an explicitif (!data) return NULL;(or equivalent error path) before callingsysctl().
src/detection/de/de_linux.c:1 ffDBusGetString()returns a boolean success value; this condition treats success as failure and will incorrectly return an error while also leavingresultpopulated. Flip the condition to fail only whenffDBusGetString(...)returns false.
src/detection/media/media_windows.cpp:1getMedia()returnsNULLon success, butffStrbufAppendS(&media->error, error)is still called unconditionally. IfffStrbufAppendSdoesn't accept NULL (common for string append APIs), this can crash. Guard the append (if (error) ...) or changegetMedia()to return an empty string on success.
src/common/impl/settings.c:1- This function assigns raw
char*pointers from theE_Config* parsedobject intoffEnlightenmentSettings, butparsedis never freed and ownership/lifetime are unclear. This risks either a leak (current behavior) or a future use-after-free ifparsedis ever freed. Consider copying these strings into caller-owned buffers (e.g.,FFstrbuf) or documenting/adding a matching destroy/free API forffEnlightenmentSettingsthat frees the underlying EET-allocated data.
src/common/impl/settings.c:1 - This function assigns raw
char*pointers from theE_Config* parsedobject intoffEnlightenmentSettings, butparsedis never freed and ownership/lifetime are unclear. This risks either a leak (current behavior) or a future use-after-free ifparsedis ever freed. Consider copying these strings into caller-owned buffers (e.g.,FFstrbuf) or documenting/adding a matching destroy/free API forffEnlightenmentSettingsthat frees the underlying EET-allocated data.
src/detection/displayserver/linux/wayland/wayland.h:1 - Defining a global
minsymbol in a public header is prone to name collisions (macros from other headers, C++std::min, etc.). Rename this helper to a project-scoped name (e.g.,ffMinU32) or use an existing project macro/util if available.
src/detection/media/media_windows.cpp:1 - This waits for WinRT async completion via a polling loop with
ffTimeSleep(0), which can still cause unnecessary CPU wakeups/spin depending on scheduler behavior and how oftenget_Statusis polled. Prefer an event-based wait (where possible) or add a small backoff (e.g., sleep a few ms) to reduce CPU usage while waiting.
src/detection/media/media_windows.cpp:1 - This waits for WinRT async completion via a polling loop with
ffTimeSleep(0), which can still cause unnecessary CPU wakeups/spin depending on scheduler behavior and how oftenget_Statusis polled. Prefer an event-based wait (where possible) or add a small backoff (e.g., sleep a few ms) to reduce CPU usage while waiting.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 115 out of 115 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (6)
src/options/general.c:1
- The
if/else ifchain is syntactically broken: after the unconditionalplayerNamebranch closes with}, the followingelse if (...)under#if ...no longer attaches to the same chain, which will not compile. Fix by keepingdsForceDrmwithin the sameelse ifchain (i.e., remove the stray}before the#ifand structure as... else if (playerName) ... #if ... else if (dsForceDrm) ... #endif else ...). The same issue also exists inffOptionsParseGeneralCommandLinewhere--ds-force-drmis now preceded by a closed chain.
src/detection/de/de_linux.c:1 ffDBusGetStringis treated as 'true means failure' here, but other call sites (and the updated DBus helpers in this PR) use the convention that a successful extraction returns true. As written, Enlightenment DBus version detection will report failure even when parsing succeeds. Invert this condition (or otherwise align it with the project-wide success semantics) so that success does not produce an error.
src/detection/media/media_apple.m:1- The authorized-process output is now parsed as a fixed set of 7 string lines (including
cover) plus 2 numeric lines ingetMediaByAuthorizedProcess, but whensaveCoveris false this code omits the cover line entirely. That shifts subsequent lines and causesposition/lengthto be mis-parsed. Fix by always emitting the cover line (empty ifsaveCoveris false), or update the parser to conditionally expect/skip the cover line based on thesaveCoverflag.
src/detection/displayserver/linux/wayland/kde-output.c:1 - Several listener callbacks that previously pointed to
stubListener(e.g.,sharpness,priority, and others depending on the generated header) are now left as NULL due to shortened initialization. If the compositor emits any of those events for the bound interface version, Wayland will call a NULL function pointer and crash. Initialize all fields up to the bound protocol version withstubListener(and optionally include newer fields too) to keep the listener safe.
src/detection/media/media_windows.cpp:1 NtCloseis not a Win32 API close routine forHANDLEin general user-mode code and is not declared by<windows.h>, which can lead to build failures and/or incorrect handle closing semantics across toolchains. PreferCloseHandle(file)here (or include the project’s NT header and consistently use the NT wrapper types/functions if that is the intended convention).
src/detection/displayserver/linux/wayland/wayland.h:1- Defining a globally visible
minfunction in a shared header risks collisions with existingminmacros/functions from system headers or other parts of the codebase. To avoid preprocessor conflicts and improve clarity, rename this helper to a project-scoped name (e.g.,ffMinU32) or use an existing project min helper if available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist