Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues/0139 macos compile warnings #149

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ctlrender/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void run_ctl_transform(const ctl_operation_t &ctl_operation, CTLResults *ctl_res
}
} catch (...) {
char message_text[512] = {'\0'};
sprintf( message_text, "CTL file must contain either a main or <module_name> (%s) function", module);
snprintf( message_text, 512, "CTL file must contain either a main or <module_name> (%s) function", module);
THROW(Iex::ArgExc, message_text);
}

Expand Down
49 changes: 42 additions & 7 deletions lib/IlmCtl/CtlType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ VoidType::VoidType (): DataType ()
bool
VoidType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down Expand Up @@ -282,7 +287,12 @@ BoolType::BoolType () : DataType ()
bool
BoolType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down Expand Up @@ -463,7 +473,12 @@ IntType::IntType () : DataType ()
bool
IntType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down Expand Up @@ -678,7 +693,12 @@ UIntType::UIntType () : DataType ()
bool
UIntType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down Expand Up @@ -892,7 +912,12 @@ HalfType::HalfType (): DataType ()
bool
HalfType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down Expand Up @@ -1076,7 +1101,12 @@ FloatType::FloatType (): DataType ()
bool
FloatType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down Expand Up @@ -1261,7 +1291,12 @@ StringType::StringType (): DataType ()
bool
StringType::isSameTypeAs (const TypePtr &t) const
{
return t && typeid (*this) == typeid (*t);
auto& t1 = *this;
const type_info& ti1 = typeid(t1);
auto& t2 = *t;
const type_info& ti2 = typeid(t2);
return t && ti1 == ti2;
//return t && typeid (*this) == typeid (*t);
}


Expand Down
9 changes: 5 additions & 4 deletions lib/dpx/dpx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,11 @@ void dpx::write(std::ostream *os)
cpu_is_little_endian=TRUE;
}

_need_byteswap=FALSE;
if(cpu_is_little_endian!=little_endian) {
_need_byteswap=TRUE;
}
//_need_byteswap=FALSE;
//if(cpu_is_little_endian!=little_endian) {
// _need_byteswap=TRUE;
//}
_need_byteswap=TRUE;

// struct tm source_creation_time_tm;
// time_t source_creation_time_time;
Expand Down
3 changes: 2 additions & 1 deletion lib/dpx/dpx_rw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ void rwinfo::write_init(std::ostream *o, dpx *h) {
if(h->current_compliance!=h->compliance) {
// XXX changed validation level... This will probably end in tears...
}
if(h->current_endian_mode!=h->current_endian_mode) {
//if(h->current_endian_mode!=h->current_endian_mode) {
if(h->current_endian_mode!=h->endian_mode) {
// XXX byteswap changed. this will probably end in tears...
}
}
Expand Down
Loading