2012/10/4, Ian Lance Taylor <iant@xxxxxxxxxx>: > On Thu, Oct 4, 2012 at 1:07 PM, Aydın Demirel <aydindem@xxxxxxxxx> wrote: >> Ok, I understand. But I changed code variable as unsigned char. But it >> still gives error. > > > Please reply to the mailing list, not just to me. Thanks. Sorry for this.. > If you change the line > char *code = load_file(script_path, NULL); > to be > unsigned char *code = load_file(script_path, NULL); > then I very much doubt that you are getting the exact same error. > > If you want help on something else, then you have to tell us exactly > what you did, exactly what happened, and what you expected to happen > instead. > > By the way, the gcc-help mailing list is for help using GCC. It's not > for learning the C or C++ languages. Thanks. Thanks.. > > Ian > > >> 2012/10/4, Ian Lance Taylor <iant@xxxxxxxxxx>: >>> On Thu, Oct 4, 2012 at 12:26 PM, Aydın Demirel <aydindem@xxxxxxxxx> >>> wrote: >>>> >>>> This is the load_file decleration: >>>> >>>> unsigned char * >>>> load_file(const char *fname, int *sizeptr) >>> >>> You wrote: >>> >>> char *code = load_file(script_path, NULL); >>> >>> load_file returns unsigned char *. You are assigning an unsigned char >>> * to a char *. Hence the error >>> >>> pointer targets in initialization differ in signedness >>> [-Werror=pointer-sign] >>> >>> The error seems exactly correct and explains the situation entirely. >>> >>> Ian >>> >>> >>>> 2012/10/4, Ian Lance Taylor <iant@xxxxxxxxxx>: >>>>> On Thu, Oct 4, 2012 at 7:51 AM, Aydın Demirel <aydindem@xxxxxxxxx> >>>>> wrote: >>>>>> Hi all; >>>>>> >>>>>> I'm trying to compile a program with gcc-4.6.2 and getting following >>>>>> error: >>>>>> >>>>>> /sources/comar/dbus/comar/src/ >>>>>> csl.c: In function 'py_compile': >>>>>> /sources/comar/dbus/comar/src/csl.c:184:18: error: pointer targets in >>>>>> initialization differ in signedness [-Werror=pointer-sign] >>>>>> >>>>> >>>>>> char *code = load_file(script_path, NULL); ==> (line 184.) >>>>> >>>>> Show us the declaration of load_file. >>>>> >>>>> Ian >>>>> >>>> >>>> >>>> -- >>>> *Aydın Demirel >>>> -------------------------- >>>> * >>>> * >>> >> >> >> -- >> *Aydın Demirel >> -------------------------- >> Senior Linux System Administrator* >> *Endersys Consultancy and Software Ltd.* >> * >> * > -- *Aydın Demirel -------------------------- Senior Linux System Administrator* *Endersys Consultancy and Software Ltd.* * *