Commit ba3e457815003cc082db12dc05c215c4a4deb921
1 parent
04b1d15a
Exists in
master
and in
1 other branch
Updating toogle type
Fixing warnings.
Showing
11 changed files
with
94 additions
and
95 deletions
Show diff stats
client/Makefile.in
client/src/core/attribute.cc
| ... | ... | @@ -94,17 +94,17 @@ |
| 94 | 94 | |
| 95 | 95 | debug("worker=",((void *) this->data)," length=",szWorker); |
| 96 | 96 | |
| 97 | - get.name = [](const void *worker) { | |
| 97 | + get.name = [](const void GNUC_UNUSED(*worker)) { | |
| 98 | 98 | return "unnamed"; |
| 99 | 99 | }; |
| 100 | 100 | |
| 101 | - get.asString = [](const Attribute &attr, const void *worker) { | |
| 101 | + get.asString = [](const Attribute GNUC_UNUSED(&attr), const void GNUC_UNUSED(*worker)) { | |
| 102 | 102 | |
| 103 | 103 | throw std::system_error(ENOTSUP, std::system_category()); |
| 104 | 104 | return ""; |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | - get.asInt32 = [](const Attribute &attr, const void *worker) { | |
| 107 | + get.asInt32 = [](const Attribute GNUC_UNUSED(&attr), const void GNUC_UNUSED(*worker)) { | |
| 108 | 108 | throw std::system_error(ENOTSUP, std::system_category()); |
| 109 | 109 | return (int32_t) 0; |
| 110 | 110 | }; |
| ... | ... | @@ -117,11 +117,11 @@ |
| 117 | 117 | return (bool) attr.get.asInt32(attr, worker) != 0; |
| 118 | 118 | }; |
| 119 | 119 | |
| 120 | - set.asString = [](const Attribute & attr, const void *worker, const char *value) { | |
| 120 | + set.asString = [](const Attribute GNUC_UNUSED(& attr), const void GNUC_UNUSED(*worker), const char GNUC_UNUSED(*value)) { | |
| 121 | 121 | throw std::system_error(ENOTSUP, std::system_category()); |
| 122 | 122 | }; |
| 123 | 123 | |
| 124 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 124 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void GNUC_UNUSED(*worker), const int32_t GNUC_UNUSED(value)) { | |
| 125 | 125 | throw std::system_error(ENOTSUP, std::system_category()); |
| 126 | 126 | }; |
| 127 | 127 | ... | ... |
client/src/core/linux/attribute.cc
| ... | ... | @@ -58,7 +58,7 @@ |
| 58 | 58 | attributes.push_back((const LIB3270_PROPERTY *) prop); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - for(auto prop = lib3270_get_toggle_list(); prop->name; prop++) { | |
| 61 | + for(auto prop = lib3270_get_toggles(); prop->name; prop++) { | |
| 62 | 62 | attributes.push_back((const LIB3270_PROPERTY *) prop); |
| 63 | 63 | } |
| 64 | 64 | ... | ... |
client/src/core/session.cc
| ... | ... | @@ -70,7 +70,7 @@ |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /// @brief Fire event. |
| 73 | - void Session::fire(const Event &event) { | |
| 73 | + void Session::fire(const Event GNUC_UNUSED(&event)) { | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | void Session::push(const PFKey key) { |
| ... | ... | @@ -415,24 +415,14 @@ |
| 415 | 415 | |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | - void Session::setAttribute(const char *name, const int value) { | |
| 418 | + void Session::setAttribute(const char GNUC_UNUSED(*name), const int GNUC_UNUSED(value)) { | |
| 419 | 419 | throw std::system_error(ENOTSUP, std::system_category()); |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - void Session::setAttribute(const char *name, const char *value) { | |
| 422 | + void Session::setAttribute(const char GNUC_UNUSED(*name), const char GNUC_UNUSED(*value)) { | |
| 423 | 423 | throw std::system_error(ENOTSUP, std::system_category()); |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | - /* | |
| 427 | - Attribute Session::getAttribute(const char *name) const { | |
| 428 | - throw std::system_error(ENOTSUP, std::system_category()); | |
| 429 | - } | |
| 430 | - | |
| 431 | - void Session::getAttributes(std::vector<Attribute> & attributes) const { | |
| 432 | - throw std::system_error(ENOTSUP, std::system_category()); | |
| 433 | - } | |
| 434 | - */ | |
| 435 | - | |
| 436 | 426 | std::vector<Attribute> Session::getAttributes() const { |
| 437 | 427 | std::vector<Attribute> attributes; |
| 438 | 428 | this->getAttributes(attributes); |
| ... | ... | @@ -456,7 +446,7 @@ |
| 456 | 446 | } |
| 457 | 447 | |
| 458 | 448 | /// @brief Create an action object |
| 459 | - Action * Session::getAction(const LIB3270_ACTION *descriptor) { | |
| 449 | + Action * Session::getAction(const LIB3270_ACTION GNUC_UNUSED(*descriptor)) { | |
| 460 | 450 | throw std::system_error(ENOTSUP, std::system_category()); |
| 461 | 451 | } |
| 462 | 452 | ... | ... |
client/src/include/ipc-client-internals.h
| ... | ... | @@ -68,6 +68,18 @@ |
| 68 | 68 | #define N_( x ) x |
| 69 | 69 | #endif // HAVE_LIBINTL |
| 70 | 70 | |
| 71 | +// | |
| 72 | +// Compiler-specific #defines. | |
| 73 | +// | |
| 74 | +// Reference: GLIBC gmacros.h | |
| 75 | +// | |
| 76 | +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | |
| 77 | + #define GNUC_UNUSED \ | |
| 78 | + __attribute__((__unused__)) | |
| 79 | +#else | |
| 80 | + #define unused | |
| 81 | +#endif | |
| 82 | + | |
| 71 | 83 | #ifdef HAVE_ICONV |
| 72 | 84 | #include <iconv.h> |
| 73 | 85 | #endif // HAVE_ICONV | ... | ... |
client/src/session/get.cc
| ... | ... | @@ -51,12 +51,12 @@ |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /// @brief Get contents of field ad address. |
| 54 | - void Abstract::Session::pop(int baddr, std::string &text) { | |
| 54 | + void Abstract::Session::pop(int GNUC_UNUSED(baddr), std::string GNUC_UNUSED(&text)) { | |
| 55 | 55 | throw std::system_error(ENOTSUP, std::system_category()); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /// @brief Get contents of field at position. |
| 59 | - void Abstract::Session::pop(unsigned short row, unsigned short col, std::string &text) { | |
| 59 | + void Abstract::Session::pop(unsigned short GNUC_UNUSED(row), unsigned short GNUC_UNUSED(col), std::string GNUC_UNUSED(&text)) { | |
| 60 | 60 | throw std::system_error(ENOTSUP, std::system_category()); |
| 61 | 61 | } |
| 62 | 62 | ... | ... |
client/src/session/local/attribute.cc
| ... | ... | @@ -87,11 +87,11 @@ |
| 87 | 87 | public: |
| 88 | 88 | IntAttribute(H3270 *hSession, const LIB3270_INT_PROPERTY *worker) : TemplateAttribute<LIB3270_INT_PROPERTY>(hSession, Attribute::Int32, worker) { |
| 89 | 89 | |
| 90 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 90 | + get.asString = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 91 | 91 | return std::to_string(attr.getInt32()); |
| 92 | 92 | }; |
| 93 | 93 | |
| 94 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 94 | + get.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 95 | 95 | |
| 96 | 96 | const struct Worker * w = (const struct Worker *) worker; |
| 97 | 97 | |
| ... | ... | @@ -106,24 +106,24 @@ |
| 106 | 106 | |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 109 | + get.asUint32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 110 | 110 | return (uint32_t) attr.getInt32(); |
| 111 | 111 | }; |
| 112 | 112 | |
| 113 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 113 | + get.asBoolean = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 114 | 114 | return (attr.getInt32() != 0); |
| 115 | 115 | }; |
| 116 | 116 | |
| 117 | 117 | if(worker->set) { |
| 118 | 118 | |
| 119 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 119 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 120 | 120 | |
| 121 | 121 | const struct Worker * w = (const struct Worker *) worker; |
| 122 | 122 | w->methods->set(w->hSession,(int) value); |
| 123 | 123 | |
| 124 | 124 | }; |
| 125 | 125 | |
| 126 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 126 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 127 | 127 | |
| 128 | 128 | const struct Worker * w = (const struct Worker *) worker; |
| 129 | 129 | w->methods->set(w->hSession,(int) value); |
| ... | ... | @@ -141,11 +141,11 @@ |
| 141 | 141 | public: |
| 142 | 142 | BooleanAttribute(H3270 *hSession, const LIB3270_INT_PROPERTY *worker) : TemplateAttribute<LIB3270_INT_PROPERTY>(hSession, Attribute::Boolean, worker) { |
| 143 | 143 | |
| 144 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 144 | + get.asString = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 145 | 145 | return attr.getInt32() ? "true" : "false"; |
| 146 | 146 | }; |
| 147 | 147 | |
| 148 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 148 | + get.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 149 | 149 | |
| 150 | 150 | const struct Worker * w = (const struct Worker *) worker; |
| 151 | 151 | |
| ... | ... | @@ -160,24 +160,24 @@ |
| 160 | 160 | |
| 161 | 161 | }; |
| 162 | 162 | |
| 163 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 163 | + get.asUint32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 164 | 164 | return (uint32_t) attr.getInt32(); |
| 165 | 165 | }; |
| 166 | 166 | |
| 167 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 167 | + get.asBoolean = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 168 | 168 | return (attr.getInt32() != 0); |
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | 171 | if(worker->set) { |
| 172 | 172 | |
| 173 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 173 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 174 | 174 | |
| 175 | 175 | const struct Worker * w = (const struct Worker *) worker; |
| 176 | 176 | w->methods->set(w->hSession,(int) value); |
| 177 | 177 | |
| 178 | 178 | }; |
| 179 | 179 | |
| 180 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 180 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 181 | 181 | |
| 182 | 182 | const struct Worker * w = (const struct Worker *) worker; |
| 183 | 183 | w->methods->set(w->hSession,(int) value); |
| ... | ... | @@ -195,15 +195,15 @@ |
| 195 | 195 | public: |
| 196 | 196 | UnsignedIntAttribute(H3270 *hSession, const LIB3270_UINT_PROPERTY *worker) : TemplateAttribute<LIB3270_UINT_PROPERTY>(hSession, Attribute::Boolean, worker) { |
| 197 | 197 | |
| 198 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 198 | + get.asString = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 199 | 199 | return std::to_string(attr.getUint32()); |
| 200 | 200 | }; |
| 201 | 201 | |
| 202 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 202 | + get.asInt32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 203 | 203 | return (int32_t) attr.getUint32(); |
| 204 | 204 | }; |
| 205 | 205 | |
| 206 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 206 | + get.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 207 | 207 | |
| 208 | 208 | const struct Worker * w = (const struct Worker *) worker; |
| 209 | 209 | |
| ... | ... | @@ -218,20 +218,20 @@ |
| 218 | 218 | |
| 219 | 219 | }; |
| 220 | 220 | |
| 221 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 221 | + get.asBoolean = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 222 | 222 | return (attr.getUint32() != 0); |
| 223 | 223 | }; |
| 224 | 224 | |
| 225 | 225 | if(worker->set) { |
| 226 | 226 | |
| 227 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 227 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 228 | 228 | |
| 229 | 229 | const struct Worker * w = (const struct Worker *) worker; |
| 230 | 230 | w->methods->set(w->hSession,(unsigned int) value); |
| 231 | 231 | |
| 232 | 232 | }; |
| 233 | 233 | |
| 234 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 234 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 235 | 235 | |
| 236 | 236 | const struct Worker * w = (const struct Worker *) worker; |
| 237 | 237 | w->methods->set(w->hSession,(unsigned int) value); |
| ... | ... | @@ -248,7 +248,7 @@ |
| 248 | 248 | public: |
| 249 | 249 | StringAttribute(H3270 *hSession, const LIB3270_STRING_PROPERTY *worker) : TemplateAttribute<LIB3270_STRING_PROPERTY>(hSession, Attribute::String, worker) { |
| 250 | 250 | |
| 251 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 251 | + get.asString = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 252 | 252 | |
| 253 | 253 | errno = 0; |
| 254 | 254 | |
| ... | ... | @@ -264,7 +264,7 @@ |
| 264 | 264 | |
| 265 | 265 | }; |
| 266 | 266 | |
| 267 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 267 | + get.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 268 | 268 | |
| 269 | 269 | const struct Worker * w = (const struct Worker *) worker; |
| 270 | 270 | const char * str = w->methods->get(w->hSession); |
| ... | ... | @@ -278,21 +278,21 @@ |
| 278 | 278 | |
| 279 | 279 | if(worker->set) { |
| 280 | 280 | |
| 281 | - set.asString = [](const Attribute & attr, const void *worker, const char *value) { | |
| 281 | + set.asString = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const char *value) { | |
| 282 | 282 | |
| 283 | 283 | const struct Worker * w = (const struct Worker *) worker; |
| 284 | 284 | w->methods->set(w->hSession,value); |
| 285 | 285 | |
| 286 | 286 | }; |
| 287 | 287 | |
| 288 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 288 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 289 | 289 | |
| 290 | 290 | const struct Worker * w = (const struct Worker *) worker; |
| 291 | 291 | w->methods->set(w->hSession,std::to_string(value).c_str()); |
| 292 | 292 | |
| 293 | 293 | }; |
| 294 | 294 | |
| 295 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 295 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 296 | 296 | |
| 297 | 297 | const struct Worker * w = (const struct Worker *) worker; |
| 298 | 298 | w->methods->set(w->hSession,std::to_string(value).c_str()); |
| ... | ... | @@ -306,15 +306,15 @@ |
| 306 | 306 | }; |
| 307 | 307 | |
| 308 | 308 | // Toggle attribute |
| 309 | - class TN3270_PRIVATE ToggleAttribute : public TemplateAttribute<LIB3270_TOGGLE_ENTRY> { | |
| 309 | + class TN3270_PRIVATE ToggleAttribute : public TemplateAttribute<LIB3270_TOGGLE> { | |
| 310 | 310 | public: |
| 311 | - ToggleAttribute(H3270 *hSession, const LIB3270_TOGGLE_ENTRY *worker) : TemplateAttribute<LIB3270_TOGGLE_ENTRY>(hSession, Attribute::Boolean, worker) { | |
| 311 | + ToggleAttribute(H3270 *hSession, const LIB3270_TOGGLE *worker) : TemplateAttribute<LIB3270_TOGGLE>(hSession, Attribute::Boolean, worker) { | |
| 312 | 312 | |
| 313 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 313 | + get.asString = [](const Attribute GNUC_UNUSED(& attr), const void GNUC_UNUSED(*worker)) { | |
| 314 | 314 | return attr.getBoolean() ? "true" : "false"; |
| 315 | 315 | }; |
| 316 | 316 | |
| 317 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 317 | + get.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 318 | 318 | |
| 319 | 319 | const struct Worker * w = (const struct Worker *) worker; |
| 320 | 320 | |
| ... | ... | @@ -330,12 +330,12 @@ |
| 330 | 330 | |
| 331 | 331 | }; |
| 332 | 332 | |
| 333 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 333 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 334 | 334 | const struct Worker * w = (const struct Worker *) worker; |
| 335 | 335 | lib3270_set_toggle(w->hSession,w->methods->id, (int) value); |
| 336 | 336 | }; |
| 337 | 337 | |
| 338 | - set.asBoolean = [](const Attribute & attr, const void *worker, const bool value) { | |
| 338 | + set.asBoolean = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const bool value) { | |
| 339 | 339 | const struct Worker * w = (const struct Worker *) worker; |
| 340 | 340 | lib3270_set_toggle(w->hSession,w->methods->id, (int) value); |
| 341 | 341 | }; |
| ... | ... | @@ -388,7 +388,7 @@ |
| 388 | 388 | |
| 389 | 389 | // Check for boolean properties |
| 390 | 390 | { |
| 391 | - const LIB3270_TOGGLE_ENTRY *toggles = lib3270_get_toggle_list(); | |
| 391 | + const LIB3270_TOGGLE *toggles = lib3270_get_toggles(); | |
| 392 | 392 | for(size_t ix = 0; toggles[ix].name; ix++) { |
| 393 | 393 | |
| 394 | 394 | if(!strcasecmp(name,toggles[ix].name)) { |
| ... | ... | @@ -446,7 +446,7 @@ |
| 446 | 446 | |
| 447 | 447 | // Add boolean properties |
| 448 | 448 | { |
| 449 | - const LIB3270_TOGGLE_ENTRY *toggles = lib3270_get_toggle_list(); | |
| 449 | + const LIB3270_TOGGLE *toggles = lib3270_get_toggles(); | |
| 450 | 450 | for(size_t ix = 0; toggles[ix].name; ix++) { |
| 451 | 451 | attributes.push_back(ToggleAttribute(hSession,&toggles[ix])); |
| 452 | 452 | } | ... | ... |
client/src/session/remote/actions.cc
| ... | ... | @@ -147,7 +147,7 @@ |
| 147 | 147 | this->action(toCharString(action)); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - void IPC::Session::print(LIB3270_CONTENT_OPTION option) { | |
| 150 | + void IPC::Session::print(LIB3270_CONTENT_OPTION GNUC_UNUSED(option)) { | |
| 151 | 151 | throw std::system_error(ENOTSUP, std::system_category()); |
| 152 | 152 | } |
| 153 | 153 | ... | ... |
client/src/session/remote/attribute.cc
| ... | ... | @@ -84,11 +84,11 @@ |
| 84 | 84 | public: |
| 85 | 85 | IntAttribute(const IPC::Session *session, const LIB3270_INT_PROPERTY *worker) : TemplateAttribute<LIB3270_INT_PROPERTY>(session, Attribute::Int32, worker) { |
| 86 | 86 | |
| 87 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 87 | + get.asString = [](const Attribute GNUC_UNUSED(& attr), const void GNUC_UNUSED(*worker)) { | |
| 88 | 88 | return std::to_string(attr.getInt32()); |
| 89 | 89 | }; |
| 90 | 90 | |
| 91 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 91 | + get.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 92 | 92 | |
| 93 | 93 | const struct Worker * w = (const struct Worker *) worker; |
| 94 | 94 | |
| ... | ... | @@ -102,17 +102,17 @@ |
| 102 | 102 | |
| 103 | 103 | }; |
| 104 | 104 | |
| 105 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 105 | + get.asUint32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 106 | 106 | return (uint32_t) attr.getInt32(); |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 109 | + get.asBoolean = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 110 | 110 | return (attr.getInt32() != 0); |
| 111 | 111 | }; |
| 112 | 112 | |
| 113 | 113 | if(worker->set) { |
| 114 | 114 | |
| 115 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 115 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 116 | 116 | |
| 117 | 117 | const struct Worker * w = (const struct Worker *) worker; |
| 118 | 118 | |
| ... | ... | @@ -122,10 +122,9 @@ |
| 122 | 122 | |
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 125 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 126 | 126 | |
| 127 | 127 | const struct Worker * w = (const struct Worker *) worker; |
| 128 | - int32_t rc; | |
| 129 | 128 | |
| 130 | 129 | IPC::Request(*w->session,true,w->methods->name) |
| 131 | 130 | .push(value) |
| ... | ... | @@ -144,19 +143,19 @@ |
| 144 | 143 | public: |
| 145 | 144 | BooleanAttribute(const IPC::Session *session, const LIB3270_INT_PROPERTY *worker) : TemplateAttribute<LIB3270_INT_PROPERTY>(session, Attribute::Boolean, worker) { |
| 146 | 145 | |
| 147 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 146 | + get.asString = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 148 | 147 | return attr.getBoolean() ? "true" : "false"; |
| 149 | 148 | }; |
| 150 | 149 | |
| 151 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 150 | + get.asInt32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 152 | 151 | return (uint32_t) attr.getBoolean(); |
| 153 | 152 | }; |
| 154 | 153 | |
| 155 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 154 | + get.asUint32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 156 | 155 | return (uint32_t) attr.getInt32(); |
| 157 | 156 | }; |
| 158 | 157 | |
| 159 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 158 | + get.asBoolean = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 160 | 159 | |
| 161 | 160 | const struct Worker * w = (const struct Worker *) worker; |
| 162 | 161 | |
| ... | ... | @@ -171,7 +170,7 @@ |
| 171 | 170 | |
| 172 | 171 | if(worker->set) { |
| 173 | 172 | |
| 174 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 173 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 175 | 174 | |
| 176 | 175 | const struct Worker * w = (const struct Worker *) worker; |
| 177 | 176 | |
| ... | ... | @@ -181,7 +180,7 @@ |
| 181 | 180 | |
| 182 | 181 | }; |
| 183 | 182 | |
| 184 | - set.asBoolean = [](const Attribute & attr, const void *worker, const bool value) { | |
| 183 | + set.asBoolean = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const bool value) { | |
| 185 | 184 | |
| 186 | 185 | const struct Worker * w = (const struct Worker *) worker; |
| 187 | 186 | |
| ... | ... | @@ -197,23 +196,23 @@ |
| 197 | 196 | }; |
| 198 | 197 | |
| 199 | 198 | // Toggle attribute |
| 200 | - class TN3270_PRIVATE ToggleAttribute : public TemplateAttribute<LIB3270_TOGGLE_ENTRY> { | |
| 199 | + class TN3270_PRIVATE ToggleAttribute : public TemplateAttribute<LIB3270_TOGGLE> { | |
| 201 | 200 | public: |
| 202 | - ToggleAttribute(const IPC::Session *session, const LIB3270_TOGGLE_ENTRY *worker) : TemplateAttribute<LIB3270_TOGGLE_ENTRY>(session, Attribute::Boolean, worker) { | |
| 201 | + ToggleAttribute(const IPC::Session *session, const LIB3270_TOGGLE *worker) : TemplateAttribute<LIB3270_TOGGLE>(session, Attribute::Boolean, worker) { | |
| 203 | 202 | |
| 204 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 203 | + get.asString = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 205 | 204 | return attr.getBoolean() ? "true" : "false"; |
| 206 | 205 | }; |
| 207 | 206 | |
| 208 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 207 | + get.asInt32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 209 | 208 | return (uint32_t) attr.getBoolean(); |
| 210 | 209 | }; |
| 211 | 210 | |
| 212 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 211 | + get.asUint32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 213 | 212 | return (uint32_t) attr.getInt32(); |
| 214 | 213 | }; |
| 215 | 214 | |
| 216 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 215 | + get.asBoolean = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 217 | 216 | |
| 218 | 217 | const struct Worker * w = (const struct Worker *) worker; |
| 219 | 218 | |
| ... | ... | @@ -226,7 +225,7 @@ |
| 226 | 225 | return value; |
| 227 | 226 | }; |
| 228 | 227 | |
| 229 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 228 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 230 | 229 | |
| 231 | 230 | const struct Worker * w = (const struct Worker *) worker; |
| 232 | 231 | |
| ... | ... | @@ -236,7 +235,7 @@ |
| 236 | 235 | |
| 237 | 236 | }; |
| 238 | 237 | |
| 239 | - set.asBoolean = [](const Attribute & attr, const void *worker, const bool value) { | |
| 238 | + set.asBoolean = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const bool value) { | |
| 240 | 239 | |
| 241 | 240 | const struct Worker * w = (const struct Worker *) worker; |
| 242 | 241 | |
| ... | ... | @@ -256,15 +255,15 @@ |
| 256 | 255 | public: |
| 257 | 256 | UnsignedIntAttribute(const IPC::Session *session, const LIB3270_UINT_PROPERTY *worker) : TemplateAttribute<LIB3270_UINT_PROPERTY>(session, Attribute::Boolean, worker) { |
| 258 | 257 | |
| 259 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 258 | + get.asString = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 260 | 259 | return std::to_string(attr.getUint32()); |
| 261 | 260 | }; |
| 262 | 261 | |
| 263 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 262 | + get.asInt32 = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 264 | 263 | return (int32_t) attr.getUint32(); |
| 265 | 264 | }; |
| 266 | 265 | |
| 267 | - get.asUint32 = [](const Attribute & attr, const void *worker) { | |
| 266 | + get.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 268 | 267 | |
| 269 | 268 | const struct Worker * w = (const struct Worker *) worker; |
| 270 | 269 | |
| ... | ... | @@ -278,16 +277,15 @@ |
| 278 | 277 | |
| 279 | 278 | }; |
| 280 | 279 | |
| 281 | - get.asBoolean = [](const Attribute & attr, const void *worker) { | |
| 280 | + get.asBoolean = [](const Attribute & attr, const void GNUC_UNUSED(*worker)) { | |
| 282 | 281 | return (attr.getUint32() != 0); |
| 283 | 282 | }; |
| 284 | 283 | |
| 285 | 284 | if(worker->set) { |
| 286 | 285 | |
| 287 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 286 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 288 | 287 | |
| 289 | 288 | const struct Worker * w = (const struct Worker *) worker; |
| 290 | - int32_t rc; | |
| 291 | 289 | |
| 292 | 290 | IPC::Request(*w->session,true,w->methods->name) |
| 293 | 291 | .push(value) |
| ... | ... | @@ -295,10 +293,9 @@ |
| 295 | 293 | |
| 296 | 294 | }; |
| 297 | 295 | |
| 298 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 296 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 299 | 297 | |
| 300 | 298 | const struct Worker * w = (const struct Worker *) worker; |
| 301 | - int32_t rc; | |
| 302 | 299 | |
| 303 | 300 | IPC::Request(*w->session,true,w->methods->name) |
| 304 | 301 | .push(value) |
| ... | ... | @@ -315,7 +312,7 @@ |
| 315 | 312 | public: |
| 316 | 313 | StringAttribute(const IPC::Session *session, const LIB3270_STRING_PROPERTY *worker) : TemplateAttribute<LIB3270_STRING_PROPERTY>(session, Attribute::String, worker) { |
| 317 | 314 | |
| 318 | - get.asString = [](const Attribute & attr, const void *worker) { | |
| 315 | + get.asString = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 319 | 316 | |
| 320 | 317 | const struct Worker * w = (const struct Worker *) worker; |
| 321 | 318 | string value; |
| ... | ... | @@ -328,7 +325,7 @@ |
| 328 | 325 | |
| 329 | 326 | }; |
| 330 | 327 | |
| 331 | - get.asInt32 = [](const Attribute & attr, const void *worker) { | |
| 328 | + get.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker) { | |
| 332 | 329 | |
| 333 | 330 | const struct Worker * w = (const struct Worker *) worker; |
| 334 | 331 | string value; |
| ... | ... | @@ -343,10 +340,9 @@ |
| 343 | 340 | |
| 344 | 341 | if(worker->set) { |
| 345 | 342 | |
| 346 | - set.asString = [](const Attribute & attr, const void *worker, const char *value) { | |
| 343 | + set.asString = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const char *value) { | |
| 347 | 344 | |
| 348 | 345 | const struct Worker * w = (const struct Worker *) worker; |
| 349 | - int32_t rc; | |
| 350 | 346 | |
| 351 | 347 | IPC::Request(*w->session,true,w->methods->name) |
| 352 | 348 | .push(value) |
| ... | ... | @@ -354,7 +350,7 @@ |
| 354 | 350 | |
| 355 | 351 | }; |
| 356 | 352 | |
| 357 | - set.asInt32 = [](const Attribute & attr, const void *worker, const int32_t value) { | |
| 353 | + set.asInt32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const int32_t value) { | |
| 358 | 354 | |
| 359 | 355 | const struct Worker * w = (const struct Worker *) worker; |
| 360 | 356 | |
| ... | ... | @@ -364,7 +360,7 @@ |
| 364 | 360 | |
| 365 | 361 | }; |
| 366 | 362 | |
| 367 | - set.asUint32 = [](const Attribute & attr, const void *worker, const uint32_t value) { | |
| 363 | + set.asUint32 = [](const Attribute GNUC_UNUSED(& attr), const void *worker, const uint32_t value) { | |
| 368 | 364 | |
| 369 | 365 | const struct Worker * w = (const struct Worker *) worker; |
| 370 | 366 | |
| ... | ... | @@ -422,7 +418,7 @@ |
| 422 | 418 | |
| 423 | 419 | // Check for boolean properties |
| 424 | 420 | { |
| 425 | - const LIB3270_TOGGLE_ENTRY *toggles = lib3270_get_toggle_list(); | |
| 421 | + const LIB3270_TOGGLE *toggles = lib3270_get_toggles(); | |
| 426 | 422 | for(size_t ix = 0; toggles[ix].name; ix++) { |
| 427 | 423 | |
| 428 | 424 | if(!strcasecmp(name,toggles[ix].name)) { |
| ... | ... | @@ -479,7 +475,7 @@ |
| 479 | 475 | |
| 480 | 476 | // Add boolean properties |
| 481 | 477 | { |
| 482 | - const LIB3270_TOGGLE_ENTRY *toggles = lib3270_get_toggle_list(); | |
| 478 | + const LIB3270_TOGGLE *toggles = lib3270_get_toggles(); | |
| 483 | 479 | for(size_t ix = 0; toggles[ix].name; ix++) { |
| 484 | 480 | attributes.push_back(ToggleAttribute(this,&toggles[ix])); |
| 485 | 481 | } | ... | ... |
client/src/session/remote/properties.cc
| ... | ... | @@ -69,7 +69,7 @@ |
| 69 | 69 | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - void IPC::Session::getAttribute(const char *name, bool &value) const { | |
| 72 | + void IPC::Session::getAttribute(const char GNUC_UNUSED(*name), bool GNUC_UNUSED(&value)) const { | |
| 73 | 73 | throw std::system_error(ENOTSUP, std::system_category()); |
| 74 | 74 | } |
| 75 | 75 | ... | ... |
client/src/testprogram/testprogram.cc
| ... | ... | @@ -167,7 +167,7 @@ |
| 167 | 167 | |
| 168 | 168 | int main(int argc, char **argv) { |
| 169 | 169 | |
| 170 | - | |
| 170 | + /* | |
| 171 | 171 | const char * session = ":a"; |
| 172 | 172 | |
| 173 | 173 | #pragma GCC diagnostic push |
| ... | ... | @@ -191,8 +191,9 @@ |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | } |
| 194 | + */ | |
| 194 | 195 | |
| 195 | - cout << "Session: " << session << endl; | |
| 196 | + // cout << "Session: " << session << endl; | |
| 196 | 197 | |
| 197 | 198 | //testHost(session); |
| 198 | 199 | //testAttributes(session); | ... | ... |