Skip to content

Fix warnign in SPM.cu: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ #231

@plexoos

Description

@plexoos

Observed in eic containers with gcc 13.4

/workspaces/eic-opticks/sysrap/SPM.cu: In instantiation of ‘static void SPM::merge_partial_select(const T*, size_t, T**, size_t*, unsigned int, float, cudaStream_t) [with T = sphotonlite; size_t = long unsigned int; cudaStream_t = CUstream_st*]’:
/workspaces/eic-opticks/sysrap/SPM.cu:293:201:   required from here
/workspaces/eic-opticks/sysrap/SPM.cu:149:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  149 |     printf("[SPM::merge_partial_select num_in %d select_flagmask %d time_window %7.3f \n", num_in, select_flagmask, time_window );
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                                        |
      |                                                                                        size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu:287:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  287 |     printf("]SPM::merge_partial_select select_flagmask %d time_window %7.3f in %d selected %d merged %d selected/in %7.3f merged/selected %7.3f \n",
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                      
      |                                                                                                                                                                                   |
      |                                                                                                                                                                                   size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu:287:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  287 |     printf("]SPM::merge_partial_select select_flagmask %d time_window %7.3f in %d selected %d merged %d selected/in %7.3f merged/selected %7.3f \n",
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                    
      |                                                                                                                                                                                           |
      |                                                                                                                                                                                           size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu:287:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  287 |     printf("]SPM::merge_partial_select select_flagmask %d time_window %7.3f in %d selected %d merged %d selected/in %7.3f merged/selected %7.3f \n",
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                            
      |                                                                                                                                                                                                         |
      |                                                                                                                                                                                                         size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu: In instantiation of ‘static void SPM::merge_partial_select(const T*, size_t, T**, size_t*, unsigned int, float, cudaStream_t) [with T = sphoton; size_t = long unsigned int; cudaStream_t = CUstream_st*]’:
/workspaces/eic-opticks/sysrap/SPM.cu:294:189:   required from here
/workspaces/eic-opticks/sysrap/SPM.cu:149:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  149 |     printf("[SPM::merge_partial_select num_in %d select_flagmask %d time_window %7.3f \n", num_in, select_flagmask, time_window );
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                                        |
      |                                                                                        size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu:287:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  287 |     printf("]SPM::merge_partial_select select_flagmask %d time_window %7.3f in %d selected %d merged %d selected/in %7.3f merged/selected %7.3f \n",
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                      
      |                                                                                                                                                                                   |
      |                                                                                                                                                                                   size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu:287:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  287 |     printf("]SPM::merge_partial_select select_flagmask %d time_window %7.3f in %d selected %d merged %d selected/in %7.3f merged/selected %7.3f \n",
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                    
      |                                                                                                                                                                                           |
      |                                                                                                                                                                                           size_t {aka long unsigned int}
/workspaces/eic-opticks/sysrap/SPM.cu:287:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  287 |     printf("]SPM::merge_partial_select select_flagmask %d time_window %7.3f in %d selected %d merged %d selected/in %7.3f merged/selected %7.3f \n",
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                            
      |                                                                                                                                                                                                         |
      |                                                                                                                                                                                                         size_t {aka long unsigned int}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions