Add Cppcheck stub headers for PS2SDK includes#82
Merged
NathanNeurotic merged 4 commits intoJan 7, 2026
Merged
Conversation
Codacy's Analysis Summary0 new issue (≤ 0 issue) Review Pull Request in Codacy →
|
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.
Motivation
Description
include/cppcheck_stubs/and create lightweight stub headers such astamtypes.h,libcdvd.h, andfileXio_rpc.hthat contain the minimal types, macros, and function prototypes used by the repo.#ifdef __CPPCHECK__ / #include "cppcheck_stubs/<header>" / #else / #include <header> / #endifso Cppcheck uses stubs while normal builds use the system headers.include/main.h,include/debugprintf.h, and multiplesrc/*.cfiles (e.g.,src/OSDInit.c,src/ps1.c,src/ps2.c,src/elf.c,src/timer.c).#pragma once, include a comment noting they are for static analysis only, and provide only what is necessary to compile under Cppcheck.Testing
rg --line-number "#include <(kernel.h|libcdvd.h|osd_config.h|libmc.h|sifrpc.h|sio.h|sifcmd.h|tamtypes.h|elf-loader.h|loadfile.h|libpad.h|debug.h|SIOCookie.h|usbhdfsd-common.h|iopcontrol.h|iopheap.h|sbv_patches.h|ps2sdkapi.h|iopcontrol_special.h|hdd-ioctl.h|io_common.h|libpwroff.h|fileXio_rpc.h)>" src includeto validate include placements and wrapper usage, which completed successfully.include/cppcheck_stubs/tamtypes.h,include/cppcheck_stubs/libcdvd.h,include/cppcheck_stubs/fileXio_rpc.h) to confirm minimal required definitions were provided.Add Cppcheck stub headers for PS2SDK includesand verified the working tree is clean withgit status --short.Codex Task