summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-26 21:28:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-26 21:28:48 -0600
commit77f4891c222583c8deffc34732ccf325bac9e11b (patch)
tree5123890a5c34e9297b26bdfa258cbe0ab9ad25c6
parent81dc14e8f035d33ab1de2c01314582ed2c17ad1c (diff)
downloadtdelibs-77f4891c222583c8deffc34732ccf325bac9e11b.tar.gz
tdelibs-77f4891c222583c8deffc34732ccf325bac9e11b.zip
Fix a number of tdelibs build warnings
-rw-r--r--kimgio/dds.cpp4
-rw-r--r--kioslave/iso/kiso.cpp8
-rw-r--r--krsync/rsyncconfigdialog.cpp2
-rw-r--r--libkmid/alsaout.cc2
-rw-r--r--libkmid/track.cc2
-rw-r--r--tdecore/kcrash.cpp5
6 files changed, 14 insertions, 9 deletions
diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp
index 6fee86569..d174bf893 100644
--- a/kimgio/dds.cpp
+++ b/kimgio/dds.cpp
@@ -490,7 +490,7 @@ namespace { // Private.
void GetBits( uchar bit_array[16] )
{
- uint b = (uint &) bits[0];
+ uint b = static_cast<uint>(bits[0]);
bit_array[0] = uchar(b & 0x07); b >>= 3;
bit_array[1] = uchar(b & 0x07); b >>= 3;
bit_array[2] = uchar(b & 0x07); b >>= 3;
@@ -500,7 +500,7 @@ namespace { // Private.
bit_array[6] = uchar(b & 0x07); b >>= 3;
bit_array[7] = uchar(b & 0x07); b >>= 3;
- b = (uint &) bits[3];
+ b = static_cast<uint>(bits[3]);
bit_array[8] = uchar(b & 0x07); b >>= 3;
bit_array[9] = uchar(b & 0x07); b >>= 3;
bit_array[10] = uchar(b & 0x07); b >>= 3;
diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp
index 47f71511d..c6faa65d2 100644
--- a/kioslave/iso/kiso.cpp
+++ b/kioslave/iso/kiso.cpp
@@ -249,7 +249,7 @@ static int mycallb(struct iso_directory_record *idr,void *udata) {
if (!special) {
if (iso->joliet) {
for (i=0;i<(isonum_711(idr->name_len)-1);i+=2) {
- TQChar ch( be2me_16(*((ushort*)&(idr->name[i]))) );
+ TQChar ch( be2me_16( idr->name[i] ) );
if (ch==';') break;
path+=ch;
}
@@ -304,14 +304,14 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
i=1;
be=boot.defentry;
while (be) {
- size=BootImageSize( isonum_711(((struct default_entry*) be->data)->media),
- isonum_721(((struct default_entry*) be->data)->seccount));
+ size=BootImageSize( isonum_711((reinterpret_cast<struct default_entry*>(be->data))->media),
+ isonum_721((reinterpret_cast<struct default_entry*>(be->data))->seccount));
path="Default Image";
if (i>1) path += " (" + TQString::number(i) + ")";
entry=new KIsoFile( this, path, dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
dirent->user(), dirent->group(), TQString::null,
- isonum_731(((struct default_entry*) be->data)->start)<<11, size<<9 );
+ isonum_731((reinterpret_cast<struct default_entry*>(be->data))->start)<<11, size<<9 );
dirent->addEntry(entry);
be=be->next;
i++;
diff --git a/krsync/rsyncconfigdialog.cpp b/krsync/rsyncconfigdialog.cpp
index 94bb9feb1..5a983efb1 100644
--- a/krsync/rsyncconfigdialog.cpp
+++ b/krsync/rsyncconfigdialog.cpp
@@ -177,6 +177,8 @@ int RsyncConfigDialog::getSyncMode()
return 2;
else if (rsync_rb3->isChecked() == true)
return 3;
+ else
+ return 0;
}
int RsyncConfigDialog::getAutoSyncFlags()
diff --git a/libkmid/alsaout.cc b/libkmid/alsaout.cc
index 73effc2e3..4c7f48f4e 100644
--- a/libkmid/alsaout.cc
+++ b/libkmid/alsaout.cc
@@ -469,7 +469,7 @@ void AlsaOut::seqbuf_clean(void)
void AlsaOut::wait(double ticks)
{
// SEQ_WAIT_TIME(((int)(ticks/convertrate)));
- time=(long int)ticks;
+ time=static_cast<long int>(ticks);
#ifdef MIDIOUTDEBUG
printfdebug("Wait >\t ticks: %g\n",ticks);
diff --git a/libkmid/track.cc b/libkmid/track.cc
index f936906e7..ccaaf69d2 100644
--- a/libkmid/track.cc
+++ b/libkmid/track.cc
@@ -334,7 +334,7 @@ void MidiTrack::readEvent(MidiEvent *ev)
case (ME_END_OF_TRACK) :
i=0;
j=0;
- while ((note[i][j]==FALSE)&&(i<16))
+ while ((i<16)&&(note[i][j]==FALSE))
{
j++;
if (j==128) { j=0; i++; };
diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp
index ffefcf97c..429e049ad 100644
--- a/tdecore/kcrash.cpp
+++ b/tdecore/kcrash.cpp
@@ -301,7 +301,10 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
}
long pid;
read_socket(socket, buffer, header.arg_length);
- pid = *((long *) buffer);
+ pid = 0;
+ for (int k=0;k<sizeof(long);k++) {
+ pid = pid | (buffer[k] << ((sizeof(long)-1-k)*8));
+ }
alarm(0); // Seems we made it....