Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9658 closed Bugs (fixed)

int from size_t conversion warning in hashed_index.hpp

Reported by: mbradle@… Owned by: Joaquín M López Muñoz
Milestone: To Be Determined Component: multi_index
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc:

Description

Hello,

When I compile libs/multi_index/example/hashed.cpp with

g++ -Wconversion -I../../.. -o hashed hashed.cpp

I get the conversion warning:

hashed.cpp:103:45: instantiated from here ../../../boost/multi_index/hashed_index.hpp:1343:21: warning: conversion to 'int' from 'size_t' may alter its value

When I apply the patch in diff.txt (attached), the code compiles without the warning. The patch also includes the change on line 1399.

Best wishes,

Brad

Attachments (1)

diff.txt (999 bytes ) - added by mbradle@… 9 years ago.
possible patch

Download all attachments as: .zip

Change History (3)

by mbradle@…, 9 years ago

Attachment: diff.txt added

possible patch

comment:1 by Joaquín M López Muñoz, 9 years ago

Resolution: fixed
Status: newclosed

in reply to:  1 comment:2 by mbradle@…, 9 years ago

Replying to joaquin:

Thank you Brad, fixed at

https://github.com/boostorg/multi_index/commit/97187ae4493228465f6bd8c197620185436685ba

A belated thanks! Best wishes.

Brad

Note: See TracTickets for help on using tickets.