c


Solved:warning: pointer targets in passing argument 2 of ‘strcat’ differ in signedness


Below is the simple code:
unsigned char buf[255];
unsigned char msg[255];
while((res = read (fd, buf, (sizeof buf)-1)) > 0)
{
buf[res] = '\0';
strcat(msg, buf);
length += res;
if(length >= 10)
break;
}
This line strcat(msg, buf); gives below warning:
warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness
I have tried every solution found for the similar question but didnt helped much. Can anyone please help why this is giving error when both variable are of same signedness. How can I remove it. Thanks
Edit:
This solved the issue:
strcat((char*)msg, (const char*)buf);

Related Links

C struct variables allocation?
Accessing Large Files In C
The sign of the modulo operator result?
uppercase Letter count, lowercase letter count, blank count, and lower to upper conversion- C
how to parse key=val to a C program from command-line
Find functional changes between two revisions of a file (compile diff?)
What does it mean to have an incomplete array in a struct?
datatype promotion in c
getchar() only calling every other time
Function pointers and address of a function
What is the difference between an open file and inode?
Bootstrapping A compiler [duplicate]
What's the best way to start a C program for multiple Unix Flavors?
Why are variables inside a struct not being assigned any value?
How to use thread in my tcpserver program to communicate between two client through server?
Read omni.jar archive file with MiniZip library

Categories

HOME
cassandra
web-scraping
amcharts
windows-phone-8
jwt
canvas
imagemagick
combinatorics
ads
bounce
webhooks
twain
evolutionary-algorithm
url-encoding
extendscript
fabricator
facebook-login
center
ram
androidplot
numerical
vsts-api
keypress
vora
core-motion
username
do.call
public
anglesharp
micropython
jquery-dirtyforms
alteryx
hadoop-streaming
limits
ion-range-slider
anomaly-detection
diode
usb4java
netbeans-8.1
flipview
webusercontrol
classnotfound
vimeo-android
live-sdk
appimage
apache-cordova
midori
go-swagger
computercraft
pyxb
actioncontroller
ironruby
haddock
perltk
locomotivecms
managed-vm
recursive-backtracking
arff
jquery-datatables
bleno
unresolved-external
artifact
save-as
pdf2swf
android-ndk-r5
edmonds-karp
rack-pow
web-traffic
abortbroadcast
phpt
windows-live
user-feedback
ubuntu-12.10
bltoolkit
packed
aol
telerik-combobox
redirecttoaction
elevated-privileges
commerce
mysql-5.1
schemabinding
radtreeview
springsource
database-tools

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App