Fix C lint errors

未關閉 適合新手
#16,454 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@raus7n 已經在處理了。

開始於 2026年11月2日。

  • #16464 來自 @raus7n —— 未關閉
  • #16476 來自 @utkarshpatwa393-sys —— 未關閉
  • #16505 來自 @BhavyaB19 —— 未關閉

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
82/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
c

研究方向

lint 報告指向 lib/node_modules/@stdlib/ndarray/base/unary/src/dispatch.c 的第 266-267 行,那裡宣告了 int64_t 指標 s1 和 s2。開啟該檔案,檢查這些指標是否只被讀取,並在 cppcheck 的 constVariablePointer 警告要求的地方加上 const。當該檔案的 C lint 工作流通過,且現有的 unary dispatch C 測試仍能建置時,即為完成。

由索引模型根據 Issue 內容生成。

描述

Good First Issue

C Linting Failures

Linting failures were detected in the automated lint workflow run.

Workflow Details
Error Details
lib/node_modules/@stdlib/ndarray/base/unary/src/dispatch.c:266:11: style: Variable 's1' can be declared as pointer to const [constVariablePointer]
 int64_t *s1;
          ^
lib/node_modules/@stdlib/ndarray/base/unary/src/dispatch.c:267:11: style: Variable 's2' can be declared as pointer to const [constVariablePointer]
 int64_t *s2;
          ^
Pull Request Instructions
  • Please use the following PR title format:
    "chore: fix C lint errors (issue #<ISSUE_NUMBER>)".
  • Reference this issue in the "Related Issues" section of the PR body as "resolves #<ISSUE_NUMBER>".
主要語言
JavaScript
星號
6k
分支
1.3k
平均合併
1 天 21 小時
30 天內合併 PR
224

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

stdlib-js/stdlib 的其他 Issue

查看 stdlib-js/stdlib 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。