delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/07/11:34:03

From: dontmailme AT iname DOT com (Steamer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: svga
Date: Wed, 07 Jun 2000 08:46:25 GMT
Organization: always disorganized
Lines: 15
Message-ID: <393e0bc3.2365883@news.freeserve.net>
References: <393A97A6 DOT 68C0EB6 AT ne DOT infi DOT net> <393A9867 DOT 8872DAEE AT it-he DOT org> <8heat2$cho$1 AT supernews DOT com> <393C606A DOT 174FA10D AT ne DOT infi DOT net> <393D5678 DOT 9F7AA087 AT it-he DOT org> <393D97B0 DOT B3A1D3C7 AT ne DOT infi DOT net>
NNTP-Posting-Host: modem-144.minnesota.dialup.pol.co.uk
X-Trace: newsg2.svr.pol.co.uk 960367586 21617 62.137.74.144 (7 Jun 2000 08:46:26 GMT)
NNTP-Posting-Date: 7 Jun 2000 08:46:26 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Martell wrote:

> im having trouble compile the following line:
> 
> if (strncmp(vesa_info.VESASignature, "VESA", 4) != 0) return -1;
> 
> i get the following error:
> 
> passing 'unsigned char *' as argument 1 of 'strncmp(const char *, const char *, long
> unsigned int)' changes signedness

This is surely only a warning, not an error.
You can fix it by using a cast:

if (strncmp((char*)(vesa_info.VESASignature), "VESA", 4) != 0) return -1;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019