]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/examples/reliable/r_publisher.c
Fix most of warnings reported by GCC 4.7 on x86_64 and GCC 4.8.1 RTEMS ARM based...
[orte.git] / orte / examples / reliable / r_publisher.c
index c97033f7ba73e994c92674af9d4541cf8f10690e..7f9408f3c8fab26aa2ec43f359c91b1b8af71568 100644 (file)
 #endif
 #include "orte.h"
 
-ORTEDomain        *d;
-char              instance2Send[64];
-int               counter=0;
+#ifdef MAIN_RENAMED
+#define main orte_r_publisher_main
+#define exit return
+#endif
+
+static ORTEDomain        *d;
+static char              instance2Send[64];
+static int               counter=0;
 
-void
+static void
 sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam) {
   char *instance=(char*)vinstance;
 
@@ -74,6 +79,10 @@ main(int argc, char *args[]) {
       sendCallBack,
       NULL,
       &repeating);
+  if (p == NULL) {
+    printf("ORTEPublicationCreate failed\n");
+    return 1;
+  }
   #ifndef CONFIG_ORTE_RT
   while(1) {
     ORTESleepMs(1000);