Re: -Wsign-conversion flag in gcc in cygwin.

2022-01-13 Thread Csaba Raduly
On Thu, 13 Jan 2022 at 15:34, Amit wrote: > > Hi, > > When I compile "long x = strlen("abcde")" on a linux system with the > following gcc flags -Wall -Wconversion, I get the following warning: ... > warning: conversion to ‘long int’ from ‘size_t’ may change the sign of the > result [-Wsign-conve

-Wsign-conversion flag in gcc in cygwin.

2022-01-13 Thread Amit
Hi, When I compile "long x = strlen("abcde")" on a linux system with the following gcc flags -Wall -Wconversion, I get the following warning: == size.c: In function ‘main’: size.c:7:17: warning: conversion to ‘long int’ from ‘size_t’ may change the sign of the result [