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-compatible DLL in Fortran to call from Matlab
How to configure correctly a PIC18 port D for output direction?
Which of following two C programs (iterative and inductive) is more efficient for finding the nth Fibonacci number? [closed]
Glib HashTable not inserting correctly
Error compiling allegro5 program using gcc on osx
Writing to openssl's stdio in C using pipe
function does not return value in c
I have to find two smallest numbers without arrays [closed]
C cleanning the buffer with loops [duplicate]
Add an option under a specific section using UCI's C API
sscanf cannot detect a number C
Knapsack with a few twist
Segmentation fault (core dumped) after pthread_join
Finding and counting strings in C using fgets and strstr
While loop doesn't initialize [closed]
Using “C”, how do I programatically change cache sizes on an Ubuntu Linux 16.04 Dell, Lenovo or Hewlett Packard 64 bit machine? [closed]

Categories

HOME
python-3.x
prestashop
find
canvas
crontab
fluent
gnu
unity-webgl
magenta
zsh
glmnet
eclipse-che
getstream-io
telerik-open-access
freetds
playframework-2.2
tm
ipython-notebook
visual-c++-2015
logrotate
holoviews
facebook-login
pgbouncer
read-the-docs
circuit-diagram
naudio
jd-gui
modbus
silktest
vora
leaflet.markercluster
ios10-today-widget
disruptor-pattern
ignore
spring-hateoas
ical4j
vs-extensibility
bulk
jsartoolkit
node-ffi
watermark
qtquickcontrols2
textinput
w3c-validation
icmp
enterprise-library
angular-ng-if
restify
googlesigninapi
soundmanager2
solrnet
content-pages
open-sesame
opencart-module
sunspot
windows-shell
objective-c-blocks
shoretel
shuffle
suitetalk
sql-server-migration-assi
schtasks
google-analytics-android
android-avd
clpfd
django-permissions
stringbuffer
har
scoping
tinyscrollbar
drupal-forms
gulp-inject
logtalk
dbms-scheduler
autorotate
static-linking
ios8.3
mean-square-error
d3dx
grunt-angular-gettext
browser-automation
tire
equations
in-clause
couchapp
doctrine-mongodb
static-constructor
mobile-devices
activemerchant
ssas-2008-r2
y2k
stratus
rncryptor
sp-send-dbmail
nhibernate-queryover
nested-resources
f-script
filecompare

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App