[devel] [PATCH for apt 26/38] Fix warning about truncation of value of pkgCache::Header::HeaderSz
Dmitry V. Levin
ldv на altlinux.org
Ср Дек 11 01:57:54 MSK 2019
On Tue, Dec 10, 2019 at 06:23:31PM +0300, Aleksei Nikiforov wrote:
> Update types of other variables as well.
What's the rationale for changing types of *all* these fields,
and for choosing architecture-dependent "unsigned long"
as the new type instead of "unsigned short"?
> ---
> apt/apt-pkg/pkgcache.h | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/apt/apt-pkg/pkgcache.h b/apt/apt-pkg/pkgcache.h
> index 05a63bc..6b44522 100644
> --- a/apt/apt-pkg/pkgcache.h
> +++ b/apt/apt-pkg/pkgcache.h
> @@ -175,13 +175,13 @@ struct pkgCache::Header
> unsigned long OptionsHash;
>
> // Size of structure values
> - unsigned short HeaderSz;
> - unsigned short PackageSz;
> - unsigned short PackageFileSz;
> - unsigned short VersionSz;
> - unsigned short DependencySz;
> - unsigned short ProvidesSz;
> - unsigned short VerFileSz;
> + unsigned long HeaderSz;
> + unsigned long PackageSz;
> + unsigned long PackageFileSz;
> + unsigned long VersionSz;
> + unsigned long DependencySz;
> + unsigned long ProvidesSz;
> + unsigned long VerFileSz;
>
> // Structure counts
> unsigned long PackageCount;
--
ldv
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : signature.asc
Тип : application/pgp-signature
Размер : 801 байтов
Описание: отсутствует
Url : <http://lists.altlinux.org/pipermail/devel/attachments/20191211/1a9f061a/attachment.bin>
Подробная информация о списке рассылки Devel