[PR #5096] [MERGED] Fix a build warning again #11678

Closed
opened 2026-04-12 23:35:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5096
Author: @coolljt0725
Created: 6/17/2024
Status: Merged
Merged: 6/17/2024
Merged by: @jmorganca

Base: mainHead: fix_build_warning_2


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 gpu/gpu_info_oneapi.c (+1 -1)

📄 Description

With the latest main branch, there is a build warning

# github.com/ollama/ollama/gpu
In file included from gpu_info_oneapi.h:4,
                 from gpu_info_oneapi.c:3:
gpu_info_oneapi.c: In function ‘oneapi_init’:
gpu_info_oneapi.c:101:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘zes_driver_handle_t’ {aka ‘struct _zes_driver_handle_t *’} [-Wformat=]
  101 |     LOG(resp->oh.verbose, "calling zesDeviceGet %d\n", resp->oh.drivers[d]);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~
      |                                                                        |
      |                                                                        zes_driver_handle_t {aka struct _zes_driver_handle_t *}
gpu_info.h:33:23: note: in definition of macro ‘LOG’
   33 |       fprintf(stderr, __VA_ARGS__); \
      |                       ^~~~~~~~~~~
gpu_info_oneapi.c:101:50: note: format string is defined here
  101 |     LOG(resp->oh.verbose, "calling zesDeviceGet %d\n", resp->oh.drivers[d]);
      |                                                 ~^
      |                                                  |
      |                                                  int

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/5096 **Author:** [@coolljt0725](https://github.com/coolljt0725) **Created:** 6/17/2024 **Status:** ✅ Merged **Merged:** 6/17/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `fix_build_warning_2` --- ### 📝 Commits (1) - [`67a92d6`](https://github.com/ollama/ollama/commit/67a92d6dad377468314d36e30cfa33ac3f5a0029) Fix a build warning ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `gpu/gpu_info_oneapi.c` (+1 -1) </details> ### 📄 Description With the latest main branch, there is a build warning ``` # github.com/ollama/ollama/gpu In file included from gpu_info_oneapi.h:4, from gpu_info_oneapi.c:3: gpu_info_oneapi.c: In function ‘oneapi_init’: gpu_info_oneapi.c:101:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘zes_driver_handle_t’ {aka ‘struct _zes_driver_handle_t *’} [-Wformat=] 101 | LOG(resp->oh.verbose, "calling zesDeviceGet %d\n", resp->oh.drivers[d]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ | | | zes_driver_handle_t {aka struct _zes_driver_handle_t *} gpu_info.h:33:23: note: in definition of macro ‘LOG’ 33 | fprintf(stderr, __VA_ARGS__); \ | ^~~~~~~~~~~ gpu_info_oneapi.c:101:50: note: format string is defined here 101 | LOG(resp->oh.verbose, "calling zesDeviceGet %d\n", resp->oh.drivers[d]); | ~^ | | | int ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:35:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11678