Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8889685

Browse files
committed
Suppress signed-vs-unsigned-char warnings.
1 parent54a8af0 commit8889685

File tree

53 files changed

+503
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+503
-515
lines changed

‎src/backend/catalog/pg_conversion.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.25 2005/07/07 20:39:57 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.26 2005/09/24 17:53:12 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -291,8 +291,8 @@ pg_convert_using(PG_FUNCTION_ARGS)
291291
Oidconvoid;
292292
HeapTupletuple;
293293
Form_pg_conversionbody;
294-
unsignedchar*str;
295-
unsignedchar*result;
294+
char*str;
295+
char*result;
296296
intlen;
297297

298298
/* Convert input string to null-terminated form */

‎src/backend/commands/copy.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.249 2005/09/01 15:34:31 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.250 2005/09/24 17:53:12 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1194,9 +1194,8 @@ CopyTo(CopyState cstate)
11941194
* encoding, because it will be sent directly with CopySendString.
11951195
*/
11961196
if (cstate->need_transcoding)
1197-
null_print_client= (char*)
1198-
pg_server_to_client((unsignedchar*)cstate->null_print,
1199-
cstate->null_print_len);
1197+
null_print_client=pg_server_to_client(cstate->null_print,
1198+
cstate->null_print_len);
12001199

12011200
/* if a header has been requested send the line */
12021201
if (cstate->header_line)
@@ -2025,8 +2024,8 @@ CopyReadLine(CopyState cstate)
20252024
{
20262025
char*cvt;
20272026

2028-
cvt=(char*)pg_client_to_server((unsignedchar*)cstate->line_buf.data,
2029-
cstate->line_buf.len);
2027+
cvt=pg_client_to_server(cstate->line_buf.data,
2028+
cstate->line_buf.len);
20302029
if (cvt!=cstate->line_buf.data)
20312030
{
20322031
/* transfer converted data back to line_buf */
@@ -2057,7 +2056,7 @@ CopyReadLineText(CopyState cstate)
20572056
intcopy_buf_len;
20582057
boolneed_data;
20592058
boolhit_eof;
2060-
unsignedchars[2];
2059+
chars[2];
20612060

20622061
s[1]=0;
20632062

@@ -2331,7 +2330,7 @@ CopyReadLineCSV(CopyState cstate)
23312330
intcopy_buf_len;
23322331
boolneed_data;
23332332
boolhit_eof;
2334-
unsignedchars[2];
2333+
chars[2];
23352334
boolin_quote= false,last_was_esc= false;
23362335
charquotec=cstate->quote[0];
23372336
charescapec=cstate->escape[0];
@@ -3100,8 +3099,7 @@ CopyAttributeOutText(CopyState cstate, char *server_string)
31003099
intmblen;
31013100

31023101
if (cstate->need_transcoding)
3103-
string= (char*)pg_server_to_client((unsignedchar*)server_string,
3104-
strlen(server_string));
3102+
string=pg_server_to_client(server_string,strlen(server_string));
31053103
else
31063104
string=server_string;
31073105

@@ -3170,8 +3168,7 @@ CopyAttributeOutCSV(CopyState cstate, char *server_string,
31703168
use_quote= true;
31713169

31723170
if (cstate->need_transcoding)
3173-
string= (char*)pg_server_to_client((unsignedchar*)server_string,
3174-
strlen(server_string));
3171+
string=pg_server_to_client(server_string,strlen(server_string));
31753172
else
31763173
string=server_string;
31773174

‎src/backend/libpq/pqcomm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
3131
* Portions Copyright (c) 1994, Regents of the University of California
3232
*
33-
*$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.179 2005/09/12 02:26:31 tgl Exp $
33+
*$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.180 2005/09/24 17:53:14 tgl Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -106,11 +106,11 @@ static char sock_path[MAXPGPATH];
106106

107107
#definePQ_BUFFER_SIZE 8192
108108

109-
staticunsignedcharPqSendBuffer[PQ_BUFFER_SIZE];
109+
staticcharPqSendBuffer[PQ_BUFFER_SIZE];
110110
staticintPqSendPointer;/* Next index to store a byte in
111111
* PqSendBuffer */
112112

113-
staticunsignedcharPqRecvBuffer[PQ_BUFFER_SIZE];
113+
staticcharPqRecvBuffer[PQ_BUFFER_SIZE];
114114
staticintPqRecvPointer;/* Next index to read a byte from
115115
* PqRecvBuffer */
116116
staticintPqRecvLength;/* End of data available in PqRecvBuffer */
@@ -482,7 +482,7 @@ Setup_AF_UNIX(void)
482482
elog(WARNING,"configuration item unix_socket_group is not supported on this platform");
483483
#else
484484
char*endptr;
485-
unsigned longintval;
485+
unsigned longval;
486486
gid_tgid;
487487

488488
val=strtoul(Unix_socket_group,&endptr,10);
@@ -741,7 +741,7 @@ pq_getbyte(void)
741741
if (pq_recvbuf())/* If nothing in buffer, then recv some */
742742
returnEOF;/* Failed to recv data */
743743
}
744-
returnPqRecvBuffer[PqRecvPointer++];
744+
return(unsignedchar)PqRecvBuffer[PqRecvPointer++];
745745
}
746746

747747
/* --------------------------------
@@ -758,7 +758,7 @@ pq_peekbyte(void)
758758
if (pq_recvbuf())/* If nothing in buffer, then recv some */
759759
returnEOF;/* Failed to recv data */
760760
}
761-
returnPqRecvBuffer[PqRecvPointer];
761+
return(unsignedchar)PqRecvBuffer[PqRecvPointer];
762762
}
763763

764764
/* --------------------------------
@@ -1029,8 +1029,8 @@ internal_flush(void)
10291029
{
10301030
staticintlast_reported_send_errno=0;
10311031

1032-
unsignedchar*bufptr=PqSendBuffer;
1033-
unsignedchar*bufend=PqSendBuffer+PqSendPointer;
1032+
char*bufptr=PqSendBuffer;
1033+
char*bufend=PqSendBuffer+PqSendPointer;
10341034

10351035
while (bufptr<bufend)
10361036
{

‎src/backend/libpq/pqformat.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
2525
* Portions Copyright (c) 1994, Regents of the University of California
2626
*
27-
*$PostgreSQL: pgsql/src/backend/libpq/pqformat.c,v 1.38 2005/09/2415:34:07 tgl Exp $
27+
*$PostgreSQL: pgsql/src/backend/libpq/pqformat.c,v 1.39 2005/09/2417:53:14 tgl Exp $
2828
*
2929
*-------------------------------------------------------------------------
3030
*/
@@ -137,7 +137,7 @@ pq_sendcountedtext(StringInfo buf, const char *str, int slen,
137137
intextra=countincludesself ?4 :0;
138138
char*p;
139139

140-
p=(char*)pg_server_to_client((unsignedchar*)str,slen);
140+
p=pg_server_to_client(str,slen);
141141
if (p!=str)/* actual conversion has been done? */
142142
{
143143
slen=strlen(p);
@@ -167,7 +167,7 @@ pq_sendtext(StringInfo buf, const char *str, int slen)
167167
{
168168
char*p;
169169

170-
p=(char*)pg_server_to_client((unsignedchar*)str,slen);
170+
p=pg_server_to_client(str,slen);
171171
if (p!=str)/* actual conversion has been done? */
172172
{
173173
slen=strlen(p);
@@ -192,7 +192,7 @@ pq_sendstring(StringInfo buf, const char *str)
192192

193193
char*p;
194194

195-
p=(char*)pg_server_to_client((unsignedchar*)str,slen);
195+
p=pg_server_to_client(str,slen);
196196
if (p!=str)/* actual conversion has been done? */
197197
{
198198
slen=strlen(p);
@@ -408,7 +408,7 @@ pq_puttextmessage(char msgtype, const char *str)
408408
intslen=strlen(str);
409409
char*p;
410410

411-
p=(char*)pg_server_to_client((unsignedchar*)str,slen);
411+
p=pg_server_to_client(str,slen);
412412
if (p!=str)/* actual conversion has been done? */
413413
{
414414
(void)pq_putmessage(msgtype,p,strlen(p)+1);
@@ -635,7 +635,7 @@ pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes)
635635
str=&msg->data[msg->cursor];
636636
msg->cursor+=rawbytes;
637637

638-
p=(char*)pg_client_to_server((unsignedchar*)str,rawbytes);
638+
p=pg_client_to_server(str,rawbytes);
639639
if (p!=str)/* actual conversion has been done? */
640640
*nbytes=strlen(p);
641641
else
@@ -675,7 +675,7 @@ pq_getmsgstring(StringInfo msg)
675675
errmsg("invalid string in message")));
676676
msg->cursor+=slen+1;
677677

678-
return(constchar*)pg_client_to_server((unsignedchar*)str,slen);
678+
returnpg_client_to_server(str,slen);
679679
}
680680

681681
/* --------------------------------

‎src/backend/postmaster/pgstat.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*Copyright (c) 2001-2005, PostgreSQL Global Development Group
1515
*
16-
*$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.107 2005/08/30 02:47:37 tgl Exp $
16+
*$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.108 2005/09/24 17:53:14 tgl Exp $
1717
* ----------
1818
*/
1919
#include"postgres.h"
@@ -788,8 +788,7 @@ pgstat_report_activity(const char *what)
788788
return;
789789

790790
len=strlen(what);
791-
len=pg_mbcliplen((constunsignedchar*)what,len,
792-
PGSTAT_ACTIVITY_SIZE-1);
791+
len=pg_mbcliplen(what,len,PGSTAT_ACTIVITY_SIZE-1);
793792

794793
memcpy(msg.m_what,what,len);
795794
msg.m_what[len]='\0';

‎src/backend/tcop/fastpath.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.81 2005/07/10 21:13:58 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.82 2005/09/24 17:53:15 tgl Exp $
1212
*
1313
* NOTES
1414
* This cruft is the server side of PQfn.
@@ -473,9 +473,7 @@ parse_fcall_arguments(StringInfo msgBuf, struct fp_info * fip,
473473
* have to do encoding conversion before calling the typinput
474474
* routine, though.
475475
*/
476-
pstring= (char*)
477-
pg_client_to_server((unsignedchar*)abuf.data,
478-
argsize);
476+
pstring=pg_client_to_server(abuf.data,argsize);
479477
fcinfo->arg[i]=
480478
OidFunctionCall3(typinput,
481479
CStringGetDatum(pstring),

‎src/backend/tcop/postgres.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.461 2005/09/22 15:33:36 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.462 2005/09/24 17:53:15 tgl Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1548,9 +1548,7 @@ exec_bind_message(StringInfo input_message)
15481548
* We have to do encoding conversion before
15491549
* calling the typinput routine.
15501550
*/
1551-
pstring= (char*)
1552-
pg_client_to_server((unsignedchar*)pbuf.data,
1553-
plength);
1551+
pstring=pg_client_to_server(pbuf.data,plength);
15541552
params[i].value=
15551553
OidFunctionCall3(typinput,
15561554
CStringGetDatum(pstring),

‎src/backend/utils/adt/ascii.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1999-2005, PostgreSQL Global Development Group
66
*
77
* IDENTIFICATION
8-
* $PostgreSQL: pgsql/src/backend/utils/adt/ascii.c,v 1.24 2005/01/01 05:43:07 momjian Exp $
8+
* $PostgreSQL: pgsql/src/backend/utils/adt/ascii.c,v 1.25 2005/09/24 17:53:15 tgl Exp $
99
*
1010
*-----------------------------------------------------------------------
1111
*/
@@ -42,31 +42,31 @@ pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *dest, int
4242
/*
4343
* ISO-8859-1 <range: 160 -- 255>
4444
*/
45-
ascii=" cL Y \"Ca -R 'u ., ?AAAAAAACEEEEIIII NOOOOOxOUUUUYTBaaaaaaaceeeeiiii nooooo/ouuuuyty";
45+
ascii=(constunsignedchar*)" cL Y \"Ca -R 'u ., ?AAAAAAACEEEEIIII NOOOOOxOUUUUYTBaaaaaaaceeeeiiii nooooo/ouuuuyty";
4646
range=RANGE_160;
4747
}
4848
elseif (enc==PG_LATIN2)
4949
{
5050
/*
5151
* ISO-8859-2 <range: 160 -- 255>
5252
*/
53-
ascii=" A L LS \"SSTZ-ZZ a,l'ls ,sstz\"zzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTBraaaalccceeeeiiddnnoooo/ruuuuyt.";
53+
ascii=(constunsignedchar*)" A L LS \"SSTZ-ZZ a,l'ls ,sstz\"zzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTBraaaalccceeeeiiddnnoooo/ruuuuyt.";
5454
range=RANGE_160;
5555
}
5656
elseif (enc==PG_LATIN9)
5757
{
5858
/*
5959
* ISO-8859-15 <range: 160 -- 255>
6060
*/
61-
ascii=" cL YS sCa -R Zu .z EeY?AAAAAAACEEEEIIII NOOOOOxOUUUUYTBaaaaaaaceeeeiiii nooooo/ouuuuyty";
61+
ascii=(constunsignedchar*)" cL YS sCa -R Zu .z EeY?AAAAAAACEEEEIIII NOOOOOxOUUUUYTBaaaaaaaceeeeiiii nooooo/ouuuuyty";
6262
range=RANGE_160;
6363
}
6464
elseif (enc==PG_WIN1250)
6565
{
6666
/*
6767
* Window CP1250 <range: 128 -- 255>
6868
*/
69-
ascii=" ' \" %S<STZZ `'\"\".-- s>stzz L A \"CS -RZ ,l'u .,as L\"lzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTBraaaalccceeeeiiddnnoooo/ruuuuyt ";
69+
ascii=(constunsignedchar*)" ' \" %S<STZZ `'\"\".-- s>stzz L A \"CS -RZ ,l'u .,as L\"lzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTBraaaalccceeeeiiddnnoooo/ruuuuyt ";
7070
range=RANGE_128;
7171
}
7272
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp